Package java.util

Examples of java.util.DuplicateFormatFlagsException


    /**
     * @tests java.util.DuplicateFormatFlagsException#DuplicateFormatFlagsException(String)
     */
    public void test_duplicateFormatFlagsException() {
        try {
            new DuplicateFormatFlagsException(null);
            fail("should throw NullPointerException.");
        } catch (NullPointerException e) {
            // desired
        }
    }
View Full Code Here


    /**
     * @tests java.util.DuplicateFormatFlagsException#getFlags()
     */
    public void test_getFlags() {
        String strFlags = "MYTESTFLAGS";
        DuplicateFormatFlagsException duplicateFormatException = new DuplicateFormatFlagsException(
                strFlags);
        assertEquals(strFlags, duplicateFormatException.getFlags());
    }
View Full Code Here

    /**
     * @tests java.util.DuplicateFormatFlagsException#getMessage()
     */
    public void test_getMessage() {
        String strFlags = "MYTESTFLAGS";
        DuplicateFormatFlagsException duplicateFormatException = new DuplicateFormatFlagsException(
                strFlags);
        assertTrue(null != duplicateFormatException.getFlags());

    }
View Full Code Here

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

        SerializationTest.verifySelf(new DuplicateFormatFlagsException(
                "TESTDESC"), exComparator);
    }
View Full Code Here

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

        SerializationTest.verifyGolden(this, new DuplicateFormatFlagsException(
                "TESTDESC"), exComparator);
    }
View Full Code Here

    char[] ca = s.toCharArray();
    Flags f = new Flags(0);
    for (int i = 0; i < ca.length; i++) {
      Flags v = parse(ca[i]);
      if (f.contains(v))
        throw new DuplicateFormatFlagsException(v.toString());
      f.add(v);
    }
    return f;
  }
View Full Code Here

TOP

Related Classes of java.util.DuplicateFormatFlagsException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.