Skip to content

Commit

Permalink
Added unit tests for creating an empty data set, and for adding a mol…
Browse files Browse the repository at this point in the history
…ecule
  • Loading branch information
egonw committed Aug 11, 2012
1 parent 14d9e84 commit b086c1b
Showing 1 changed file with 14 additions and 0 deletions.
Expand Up @@ -131,6 +131,20 @@ CDKMolecule.INCHI_OBJECT, new InChI(
Assert.assertNotSame(0, descriptors.getRowCount());
}

@Test public void testCreateEmptyDataSet() throws Exception {
String uriString = opentox.createDataset(TEST_SERVER_OT);
Assert.assertNotNull(uriString);
Assert.assertTrue(uriString.startsWith("http://"));
URI uri = new URI(uriString);
Assert.assertNotNull(uri);
}

@Test public void testAddMolecule() throws Exception {
String uriString = opentox.createDataset(TEST_SERVER_OT);
Assert.assertNotNull(uriString);
opentox.addMolecule(uriString, cdk.fromSMILES("COC"));
}

@Test public void testCreateDataSetFromSet() throws Exception {
List<ICDKMolecule> molecules = cdk.createMoleculeList();
molecules.add(cdk.fromSMILES("COC"));
Expand Down

0 comments on commit b086c1b

Please sign in to comment.