Skip to content

Commit b35412b

Browse files
johnmayegonw
authored andcommitted
Eliminate testdata dependency from cdk-reaction
1 parent 94c5162 commit b35412b

File tree

9 files changed

+12
-19
lines changed

9 files changed

+12
-19
lines changed

base/reaction/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,6 @@
8686
<type>test-jar</type>
8787
<scope>test</scope>
8888
</dependency>
89-
<dependency>
90-
<groupId>${project.groupId}</groupId>
91-
<artifactId>cdk-testdata</artifactId>
92-
<version>${project.parent.version}</version>
93-
<type>test-jar</type>
94-
<scope>test</scope>
95-
</dependency>
9689
</dependencies>
9790

9891
</project>

base/reaction/src/test/java/org/openscience/cdk/graph/invariant/ConjugatedPiSystemsDetectorTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static void setup() {
7070
public void testDetectButadiene() throws Exception {
7171
logger.info("Entering testDetectButadiene.");
7272
IAtomContainer mol = null;
73-
String filename = "data/cml/butadiene.cml";
73+
String filename = "butadiene.cml";
7474
mol = readCMLMolecule(filename);
7575

7676
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
@@ -101,7 +101,7 @@ public void testDetectButadiene() throws Exception {
101101
public void testDetectNaphtalene() throws Exception {
102102
logger.info("Entering testDetectNaphtalene.");
103103
IAtomContainer mol = null;
104-
String filename = "data/cml/naphtalene.cml";
104+
String filename = "naphtalene.cml";
105105
mol = readCMLMolecule(filename);
106106

107107
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
@@ -132,7 +132,7 @@ public void testDetectNaphtalene() throws Exception {
132132
public void testDetectToluene() throws Exception {
133133
logger.info("Entering testDetectToluene.");
134134
IAtomContainer mol = null;
135-
String filename = "data/cml/toluene.cml";
135+
String filename = "toluene.cml";
136136
mol = readCMLMolecule(filename);
137137

138138
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
@@ -163,8 +163,8 @@ public void testDetectToluene() throws Exception {
163163
public void testNonConnectedPiSystems() throws Exception {
164164
logger.info("Entering testNonConnectedPiSystems.");
165165
IAtomContainer mol = null;
166-
String filename = "data/mdl/nonConnectedPiSystems.mol";
167-
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
166+
String filename = "nonConnectedPiSystems.mol";
167+
InputStream ins = this.getClass().getResourceAsStream(filename);
168168
MDLReader reader = new MDLReader(ins);
169169
IChemFile chemFile = (IChemFile) reader.read((ChemObject) new ChemFile());
170170
mol = chemFile.getChemSequence(0).getChemModel(0).getMoleculeSet().getAtomContainer(0);
@@ -208,8 +208,8 @@ public void testNonConnectedPiSystems() throws Exception {
208208
public void testPiSystemWithCarbokation() throws Exception {
209209
logger.info("Entering testPiSystemWithCarbokation.");
210210
IAtomContainer mol = null;
211-
String filename = "data/mdl/piSystemWithCarbokation.mol";
212-
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
211+
String filename = "piSystemWithCarbokation.mol";
212+
InputStream ins = this.getClass().getResourceAsStream(filename);
213213
MDLReader reader = new MDLReader(ins);
214214
IChemFile chemFile = (IChemFile) reader.read((ChemObject) new ChemFile());
215215
mol = chemFile.getChemSequence(0).getChemModel(0).getMoleculeSet().getAtomContainer(0);
@@ -251,8 +251,8 @@ public void testPiSystemWithCarbokation() throws Exception {
251251
public void testPiSystemWithCumulativeDB() throws Exception {
252252
logger.info("Entering testPiSystemWithCumulativeDB.");
253253
IAtomContainer mol = null;
254-
String filename = "data/mdl/piSystemCumulative.mol";
255-
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
254+
String filename = "piSystemCumulative.mol";
255+
InputStream ins = this.getClass().getResourceAsStream(filename);
256256
MDLReader reader = new MDLReader(ins);
257257
IChemFile chemFile = (IChemFile) reader.read((ChemObject) new ChemFile());
258258

@@ -330,8 +330,8 @@ public void testAceticAcid() throws Exception {
330330
@Test
331331
public void testNN_dimethylaniline_cation() throws Exception {
332332
IAtomContainer mol = null;
333-
String filename = "data/mdl/NN_dimethylaniline.mol";
334-
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
333+
String filename = "NN_dimethylaniline.mol";
334+
InputStream ins = this.getClass().getResourceAsStream(filename);
335335
MDLV2000Reader reader = new MDLV2000Reader(ins);
336336
IChemFile chemFile = (IChemFile) reader.read((ChemObject) new ChemFile());
337337
mol = chemFile.getChemSequence(0).getChemModel(0).getMoleculeSet().getAtomContainer(0);
@@ -452,7 +452,7 @@ public void test3Aminomethane_cation() throws Exception {
452452
private IAtomContainer readCMLMolecule(String filename) throws Exception {
453453
IAtomContainer mol = null;
454454
logger.debug("Filename: " + filename);
455-
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
455+
InputStream ins = this.getClass().getResourceAsStream(filename);
456456
CMLReader reader = new CMLReader(ins);
457457

458458
IChemFile file = (IChemFile) reader.read(new ChemFile());

0 commit comments

Comments
 (0)