Examples of FakeUuid


Examples of com.sun.jini.test.spec.id.util.FakeUuid

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 2: "
            + "accessor methods return constructor args");
        logger.log(Level.FINE,"");

        Uuid uuid = new FakeUuid(Long.MAX_VALUE,Long.MIN_VALUE);
        assertion(uuid.getMostSignificantBits() == Long.MAX_VALUE);
        assertion(uuid.getLeastSignificantBits() == Long.MIN_VALUE);

        return;
    }
View Full Code Here

Examples of com.sun.jini.test.spec.id.util.FakeUuid

            + "normal equal hashCode, equals, toString method calls");
        logger.log(Level.FINE,"");

        // construct two instances of Uuid
        Uuid uuid1 = UuidFactory.create(13,11);
        Uuid uuid2 = new FakeUuid(13,11);

        // verify Uuid equals, hashCode, and toString methods
        assertion(uuid1.equals(uuid2));
        assertion(uuid2.equals(uuid1));
        assertion(uuid1.equals(uuid1));
        assertion(uuid2.equals(uuid2));
        assertion(uuid1.hashCode() == uuid2.hashCode());
        assertion(uuid1.toString() != null);
        assertion(uuid1.toString().equals(uuid2.toString()));
        assertion(
            uuid1.toString().equals("00000000-0000-000d-0000-00000000000b"),
            "uuid1.toString(): " + uuid1);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 2: "
            + "normal non-equal equals and toString method calls");
        logger.log(Level.FINE,"");

        // construct a third instance of Uuid
        Uuid uuid3 = new FakeUuid(11,13); //reversed bits

        // verify Uuid equals, hashCode, and toString methods
        assertion(! uuid1.equals(uuid3));
        assertion(! uuid3.equals(uuid1));
        assertion(! uuid1.toString().equals(uuid3.toString()));

        return;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.