FileDocCategorySizeDatePackage
InvalidObjectExceptionTest.javaAPI DocAndroid 1.5 API2008Wed May 06 22:41:04 BST 2009tests.api.java.io

InvalidObjectExceptionTest

public class InvalidObjectExceptionTest extends TestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtest_ConstructorLjava_lang_String()

tests
java.io.InvalidObjectException#InvalidObjectException(java.lang.String)

        // Test for method java.io.InvalidObjectException(java.lang.String)
        try {
            if (true) throw new InvalidObjectException("This object is not valid.");
            fail("Exception not thrown.");
        } catch (InvalidObjectException e) {
            assertEquals("The exception message is not equal to the one " +
                         "passed to the constructor.",
                         "This object is not valid.", e.getMessage());
        }