예제 #1
0
 public void testGetUniqueIdentifier() {
   String uid = "";
   try {
     uid =
         DomainModel.getUniqueIdentifier(
             "iris.irri.org",
             DomainModel.getNameSpace(GermplasmBaseConstants.DATATYPE_ID),
             "110",
             "1-8-2006");
   } catch (GCPException ge) {
     fail(ge.getMessage());
   }
   assertEquals(UID1, uid);
 }
예제 #2
0
  public void testResolveDataType() {
    System.out.println("\nEntering testResolveDataType():\n");

    try {
      String dataTypeID = DomainModel.resolveDataType(UID1);
      assertNotNull(dataTypeID);
      assertEquals(GermplasmBaseConstants.DATATYPE_ID, dataTypeID);
      System.out.println("UID1: '" + UID1 + "' => dataTypeID: '" + dataTypeID + "'");

      dataTypeID = DomainModel.resolveDataType(UID2);
      assertNotNull(dataTypeID);
      assertEquals(GermplasmBaseConstants.DATATYPE_ID, dataTypeID);
      System.out.println("UID2: '" + UID2 + "' => dataTypeID: '" + dataTypeID + "'");

      dataTypeID = DomainModel.resolveDataType(UID3);
      assertNotNull(dataTypeID);
      assertEquals(GermplasmBaseConstants.DATATYPE_ID, dataTypeID);
      System.out.println("UID3: '" + UID3 + "' => dataTypeID: '" + dataTypeID + "'");
    } catch (GCPException ge) {
      fail(ge.getMessage());
    }

    System.out.println("testResolveDataType()... test passed!");
  }