Skip to content

Commit

Permalink
Added unit tests fo the two opentox.createDataset() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Aug 11, 2012
1 parent d4d02e1 commit 14d9e84
Showing 1 changed file with 19 additions and 0 deletions.
Expand Up @@ -10,6 +10,7 @@
******************************************************************************/
package net.bioclipse.opentox.test;

import java.net.URI;
import java.util.List;

import net.bioclipse.cdk.business.CDKManager;
Expand Down Expand Up @@ -130,6 +131,24 @@ CDKMolecule.INCHI_OBJECT, new InChI(
Assert.assertNotSame(0, descriptors.getRowCount());
}

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

String uriString = opentox.createDataset(TEST_SERVER_OT, molecules);
Assert.assertNotNull(uriString);
URI uri = new URI(uriString);
Assert.assertNotNull(uri);
}

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

@Test public void testCalculateDescriptor_List_Molecule() throws Exception {
IStringMatrix stringMat = opentox.listDescriptors(TEST_SERVER_ONT);

Expand Down

0 comments on commit 14d9e84

Please sign in to comment.