Project

General

Profile

« Previous | Next » 

Revision 10187

Added by Jing Tao about 7 years ago

Add a test method to test the method check if a local id is in the xml_revision table.

View differences:

test/edu/ucsb/nceas/metacattest/IdentifierManagerTest.java
95 95
        suite.addTest(new IdentifierManagerTest("testSystemMetadataPIDExists"));
96 96
        suite.addTest(new IdentifierManagerTest("testSystemMetadataSIDExists"));
97 97
        suite.addTest(new IdentifierManagerTest("testObjectFileExist"));
98
        suite.addTest(new IdentifierManagerTest("testExistsInXmlRevisionTable"));
99
        
98 100
        return suite;
99 101
    }
100 102
    /**
......
1740 1742
     
1741 1743
        
1742 1744
    }
1745
    
1746
    public void testExistsInXmlRevisionTable() {
1747
        try {
1748
            String localId = "test.12";
1749
            int rev =1;
1750
            assertTrue("The object "+localId+" should not exists in the xml_revisions table.", !IdentifierManager.getInstance().existsInXmlLRevisionTable(localId, rev));
1751
        } catch (Exception e) {
1752
            e.printStackTrace();
1753
            fail("testExistsInXmlRevisiontable failed since" +e.getMessage());
1754
        }
1755
        
1756
    }
1743 1757
    /**
1744 1758
     * We want to act as the CN itself
1745 1759
     * @throws ServiceFailure 

Also available in: Unified diff