Package org.gedcom4j.model

Examples of org.gedcom4j.model.Gedcom


    /**
     * Test method for {@link org.gedcom4j.model.Gedcom#hashCode()}.
     */
    @Test
    public void testHashCode() {
        Gedcom g1 = new Gedcom();
        Gedcom g2 = new Gedcom();
        assertEquals("objects are equal, so hashcodes should equal",
                g1.hashCode(), g2.hashCode());
        g1.trailer = null;
        assertFalse(
                "objects are no longer equal, so hashcodes should no longer equal",
                g1.hashCode() == g2.hashCode());
        g2.trailer = null;
        assertEquals(
                "objects are equal again, so hashcodes should equal again",
                g1.hashCode(), g2.hashCode());
        g1.individuals.put("FryingPan", new Individual());
        assertFalse(
                "objects are no longer equal, so hashcodes should no longer equal",
                g1.hashCode() == g2.hashCode());
        g2.individuals.put("FryingPan", new Individual());
        assertEquals(
                "objects are equal again, so hashcodes should equal again",
                g1.hashCode(), g2.hashCode());
    }
View Full Code Here


     */
    @Test
    public void test() throws IOException, GedcomParserException {
        GedcomParser gp = new GedcomParser();
        gp.load("sample/Issue 63.ged");
        Gedcom g = gp.gedcom;
        assertNotNull(g);
        assertEquals(1, g.families.size());
        assertEquals(2, g.individuals.size());

        Family family = g.families.get("@F001@");
View Full Code Here

    /**
     * Test for character set in header
     */
    @Test
    public void testCharacterSet() {
        Gedcom g = new Gedcom();
        rootValidator.gedcom = g;
        rootValidator.autorepair = false;
        Submitter s = new Submitter();
        s.xref = "@SUBM0001@";
        s.name = new StringWithCustomTags("test");
View Full Code Here

    /**
     * Test for copyright data in header
     */
    @Test
    public void testCopyrightData() {
        Gedcom g = new Gedcom();
        rootValidator.gedcom = g;
        rootValidator.autorepair = false;
        Submitter s = new Submitter();
        s.xref = "@SUBM0001@";
        s.name = new StringWithCustomTags("test");
View Full Code Here

    /**
     * Test for Gedcom version in header
     */
    @Test
    public void testGedcomVersion() {
        Gedcom g = new Gedcom();
        rootValidator.gedcom = g;
        rootValidator.autorepair = false;
        Submitter s = new Submitter();
        s.xref = "@SUBM0001@";
        s.name = new StringWithCustomTags("test");
View Full Code Here

    /**
     * Test header without submitters
     */
    @Test
    public void testNoSubmitters() {
        Gedcom g = new Gedcom();
        rootValidator.gedcom = g;
        g.submission = new Submission("@SUBN0001@");
        g.header.submission = g.submission;

        rootValidator.autorepair = false;
View Full Code Here

    /**
     * Test for sourceSystem in header
     */
    @Test
    public void testSourceSystem() {
        Gedcom g = new Gedcom();
        rootValidator.gedcom = g;
        rootValidator.autorepair = false;
        Submitter s = new Submitter();
        s.xref = "@SUBM0001@";
        s.name = new StringWithCustomTags("test");
View Full Code Here

     */
    @Test
    public void testWriteFileWithName() throws IOException, GedcomWriterException {
        String fn = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator")
                + "gedcomfilewritertest.ged";
        Gedcom g = new Gedcom();
        g.submission = new Submission("@SUBN0001@");
        g.header.submission = g.submission;
        Submitter s = new Submitter();
        s.xref = "@SUBM0001@";
        s.name = new StringWithCustomTags("Joe Tester");
View Full Code Here

    /**
     * Test for personal name variation validator
     */
    @Test
    public void testOne() {
        Gedcom g = TestHelper.getMinimalGedcom();
        rootValidator.gedcom = g;

        Individual i = new Individual();
        i.xref = "@I00001@";
        g.individuals.put(i.xref, i);
View Full Code Here

     */
    @Before
    public void setUp() throws IOException, GedcomParserException {
        GedcomParser gp = new GedcomParser();
        gp.load("sample/Event Tag Test.ged");
        Gedcom g = gp.gedcom;
        assertNotNull(g);
        assertTrue(gp.errors.isEmpty());
        assertEquals("Two tags had descriptions where [Y|<NULL>] belonged", 2, gp.warnings.size());
        assertFalse(g.individuals.isEmpty());
        assertEquals(1, g.individuals.size());
View Full Code Here

TOP

Related Classes of org.gedcom4j.model.Gedcom

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.