Package org.gedcom4j.model

Examples of org.gedcom4j.model.Corporation


        h.sourceSystem.corporation = null;
        rootValidator.validate();
        assertNoIssues();

        h.sourceSystem.corporation = new Corporation();
        rootValidator.validate();
        assertNoIssues();

        h.sourceSystem.corporation.businessName = null;
        rootValidator.validate();
View Full Code Here


     * {@link org.gedcom4j.model.Corporation#equals(java.lang.Object)}
     * .
     */
    @Test
    public void testEqualsObject() {
        Corporation c1 = new Corporation();
        assertEquals(c1, c1);
        Corporation c2 = new Corporation();
        assertEquals(
                "CorporationTests are equal, so equals() should return true",
                c1, c2);
        c1.businessName = "Frying Pan";
        assertFalse(
                "CorporationTests are no longer equal, so hashcodes should no longer equal",
                c1.equals(c2));
        c2.businessName = "Frying Pan";
        assertEquals(
                "CorporationTests are equal again, so equals() should return true again",
                c1.hashCode(), c2.hashCode());
        assertFalse(c1.equals(null));
        assertFalse(c1.equals(this));
    }
View Full Code Here

     * Test method for
     * {@link org.gedcom4j.model.Corporation#hashCode()}.
     */
    @Test
    public void testHashCode() {
        Corporation c1 = new Corporation();
        Corporation c2 = new Corporation();
        assertEquals("Objects are equal, so equals() should return true",
                c1.hashCode(), c2.hashCode());
        c1.businessName = "Frying Pan";
        assertFalse(
                "Objects are no longer equal, so equals() should return false",
                c1.hashCode() == c2.hashCode());
        c2.businessName = "Frying Pan";
        assertEquals(
                "Objects are equal again, so equals() should return true again",
                c1.hashCode(), c2.hashCode());
    }
View Full Code Here

TOP

Related Classes of org.gedcom4j.model.Corporation

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.