Code example for InputMismatchException

Methods: getMessage

0
 
    /** 
     * @tests java.util.InputMismatchException#InputMismatchException(String) 
     */ 
    public void test_ConstructorLjava_lang_String() { 
        InputMismatchException exception = new InputMismatchException(
                ERROR_MESSAGE);
        assertNotNull(exception);
        assertEquals(ERROR_MESSAGE, exception.getMessage());
    } 
 
    /** 
     * @tests serialization/deserialization. 
     */ 
    public void testSerializationSelf() throws Exception { 
 
        SerializationTest.verifySelf(new InputMismatchException(ERROR_MESSAGE));
    } 
 
    /** 
     * @tests serialization/deserialization compatibility with RI.