Skip to content

Commit

Permalink
Preset the InChI, so that the test does not fail of the InChI lib can…
Browse files Browse the repository at this point in the history
…not be loaded
  • Loading branch information
egonw committed Nov 12, 2011
1 parent a631584 commit 54dc537
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
7 changes: 7 additions & 0 deletions features/net.bioclipse.opentox.test_feature/feature.xml
Expand Up @@ -55,4 +55,11 @@ The Eclipse Public License accompanies this distribution, and is available at ht
version="0.0.0"
unpack="false"/>

<plugin
id="net.bioclipse.inchi"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
3 changes: 2 additions & 1 deletion plugins/net.bioclipse.opentox.test/META-INF/MANIFEST.MF
Expand Up @@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.ui,
net.sf.cglib,
org.springframework.osgi.aopalliance.osgi,
net.bioclipse.opentox,
net.bioclipse.cdk.business
net.bioclipse.cdk.business,
net.bioclipse.inchi
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.apache.log4j,
org.junit,
Expand Down
Expand Up @@ -14,10 +14,12 @@
import java.util.List;

import net.bioclipse.cdk.business.CDKManager;
import net.bioclipse.cdk.domain.CDKMolecule;
import net.bioclipse.cdk.domain.ICDKMolecule;
import net.bioclipse.core.business.BioclipseException;
import net.bioclipse.core.domain.IStringMatrix;
import net.bioclipse.core.tests.AbstractManagerTest;
import net.bioclipse.inchi.InChI;
import net.bioclipse.managers.business.IBioclipseManager;
import net.bioclipse.opentox.business.IOpentoxManager;

Expand Down Expand Up @@ -105,9 +107,15 @@ public abstract class AbstractOpentoxManagerPluginTest
}

@Test public void testSearchMolecule() throws BioclipseException {
ICDKMolecule mol = cdk.fromSMILES("C");
mol.setProperty(
CDKMolecule.INCHI_OBJECT, new InChI(
"InChI=1S/CH4/h1H4",
"VNWKTOKETHGBQD-UHFFFAOYSA-N"
)
);
List<String> hits = opentox.search(
TEST_SERVER_OT,
cdk.fromSMILES("COC")
TEST_SERVER_OT, mol
);
Assert.assertNotNull(hits);
// expect at least one hit:
Expand Down

0 comments on commit 54dc537

Please sign in to comment.