Exemplo n.º 1
0
 @Test
 public void testAddGetProperty() {
   IChemDatabase database = new AmbitDatabase();
   Assert.assertNotNull(database);
   IIdentifier ident = new Identifier(CustomIndentifier.getInstance(), "1");
   IProperty property = new Property(Name.getInstance(), "foo");
   database.addProperty(ident, property);
   Assert.assertEquals(property, database.getProperty(ident, Name.getInstance()));
 }
Exemplo n.º 2
0
 @Test
 public void testAddGetMolecule() {
   IChemDatabase database = new AmbitDatabase();
   String molecule = "CCC"; // SMILES
   Assert.assertNotNull(database);
   IIdentifier ident = new Identifier(CustomIndentifier.getInstance(), "1");
   database.add(ident, molecule);
   Assert.assertEquals(molecule, database.get(ident));
 }