类java.util.IllegalFormatCodePointException源码实例Demo

下面列出了怎么用java.util.IllegalFormatCodePointException的API类实例代码及写法,或者点击链接到github查看源代码。


/**
 * java.util.IllegalFormatCodePointException.getCodePoint()
 */
public void test_getCodePoint() {
    int codePoint = 12345;
    IllegalFormatCodePointException illegalFormatCodePointException = new IllegalFormatCodePointException(
            codePoint);
    assertEquals(codePoint, illegalFormatCodePointException.getCodePoint());
}
 

/**
 * java.util.IllegalFormatCodePointException.getMessage()
 */
public void test_getMessage() {
    int codePoint = 12345;
    IllegalFormatCodePointException illegalFormatCodePointException = new IllegalFormatCodePointException(
            codePoint);
    assertTrue(null != illegalFormatCodePointException.getMessage());
}
 

public void assertDeserialized(Serializable initial,
        Serializable deserialized) {

    SerializationTest.THROWABLE_COMPARATOR.assertDeserialized(initial,
            deserialized);

    IllegalFormatCodePointException initEx = (IllegalFormatCodePointException) initial;
    IllegalFormatCodePointException desrEx = (IllegalFormatCodePointException) deserialized;

    assertEquals("CodePoint", initEx.getCodePoint(), desrEx
            .getCodePoint());
}
 

/**
 * java.util.IllegalFormatCodePointException.IllegalFormatCodePointException(int)
 */
public void test_illegalFormatCodePointException() {
    IllegalFormatCodePointException illegalFormatCodePointException = new IllegalFormatCodePointException(
            -1);
    assertTrue(null != illegalFormatCodePointException);
}
 

/**
 * serialization/deserialization.
 */
public void testSerializationSelf() throws Exception {

    SerializationTest.verifySelf(
            new IllegalFormatCodePointException(12345), exComparator);
}
 

/**
 * serialization/deserialization compatibility with RI.
 */
public void testSerializationCompatibility() throws Exception {

    SerializationTest.verifyGolden(this,
            new IllegalFormatCodePointException(12345), exComparator);
}
 
 类所在包
 同包方法