1/* Licensed to the Apache Software Foundation (ASF) under one or more 2 * contributor license agreements. See the NOTICE file distributed with 3 * this work for additional information regarding copyright ownership. 4 * The ASF licenses this file to You under the Apache License, Version 2.0 5 * (the "License"); you may not use this file except in compliance with 6 * the License. You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package org.apache.harmony.luni.tests.java.util; 18 19import dalvik.annotation.TestTargets; 20import dalvik.annotation.TestLevel; 21import dalvik.annotation.TestTargetNew; 22import dalvik.annotation.TestTargetClass; 23 24import junit.framework.TestCase; 25 26import java.util.FormatterClosedException; 27 28import org.apache.harmony.testframework.serialization.SerializationTest; 29import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert; 30 31@TestTargetClass(FormatterClosedException.class) 32public class FormatterClosedExceptionTest extends TestCase { 33 34 /** 35 * @tests serialization/deserialization. 36 */ 37 @TestTargetNew( 38 level = TestLevel.COMPLETE, 39 notes = "", 40 method = "!SerializationSelf", 41 args = {} 42 ) 43 public void testSerializationSelf() throws Exception { 44 45 SerializationTest.verifySelf(new FormatterClosedException()); 46 } 47 48 /** 49 * @tests serialization/deserialization compatibility with RI. 50 */ 51 @TestTargetNew( 52 level = TestLevel.COMPLETE, 53 notes = "", 54 method = "!SerializationGolden", 55 args = {} 56 ) 57 public void testSerializationCompatibility() throws Exception { 58 59 SerializationTest.verifyGolden(this, new FormatterClosedException()); 60 } 61 62 @TestTargetNew( 63 level = TestLevel.COMPLETE, 64 notes = "", 65 method = "FormatterClosedException", 66 args = {} 67 ) 68 public void test_constructor() { 69 assertNotNull(new FormatterClosedException()); 70 } 71} 72