File tree Expand file tree Collapse file tree 10 files changed +17
-33
lines changed
interfaces/src/main/java/org/openscience/cdk
test/src/test/java/org/openscience/cdk/qsar/descriptors
src/test/java/org/openscience/cdk/qsar/descriptors/molecular Expand file tree Collapse file tree 10 files changed +17
-33
lines changed File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 23
23
import org .junit .Assert ;
24
24
import org .junit .Test ;
25
25
import org .openscience .cdk .CDKTestCase ;
26
- import org .openscience .cdk .DefaultChemObjectBuilder ;
27
26
import org .openscience .cdk .IImplementationSpecification ;
27
+ import org .openscience .cdk .interfaces .IChemObjectBuilder ;
28
28
import org .openscience .cdk .qsar .IDescriptor ;
29
29
30
30
/**
@@ -42,7 +42,15 @@ public void setDescriptor(Class<? extends T> descriptorClass) throws Exception {
42
42
if (descriptor == null ) {
43
43
Constructor <? extends T > defaultConstructor = descriptorClass .getConstructor ();
44
44
this .descriptor = defaultConstructor .newInstance ();
45
- this .descriptor .initialise (DefaultChemObjectBuilder .getInstance ());
45
+ }
46
+ }
47
+
48
+ public void setDescriptor (Class <? extends T > descriptorClass ,
49
+ IChemObjectBuilder builder ) throws Exception {
50
+ if (descriptor == null ) {
51
+ Constructor <? extends T > defaultConstructor = descriptorClass .getConstructor ();
52
+ this .descriptor = defaultConstructor .newInstance ();
53
+ this .descriptor .initialise (builder );
46
54
}
47
55
}
48
56
Original file line number Diff line number Diff line change 93
93
<type >test-jar</type >
94
94
<scope >test</scope >
95
95
</dependency >
96
- <dependency >
97
- <groupId >${project.groupId} </groupId >
98
- <artifactId >cdk-qsar</artifactId >
99
- <version >${project.parent.version} </version >
100
- <type >test-jar</type >
101
- <scope >test</scope >
102
- </dependency >
103
96
<dependency >
104
97
<groupId >${project.groupId} </groupId >
105
98
<artifactId >cdk-diff</artifactId >
Original file line number Diff line number Diff line change 73
73
<type >test-jar</type >
74
74
<scope >test</scope >
75
75
</dependency >
76
- <dependency >
77
- <groupId >${project.groupId} </groupId >
78
- <artifactId >cdk-qsar</artifactId >
79
- <version >${project.parent.version} </version >
80
- <type >test-jar</type >
81
- <scope >test</scope >
82
- </dependency >
83
76
<dependency >
84
77
<groupId >${project.groupId} </groupId >
85
78
<artifactId >cdk-testdata</artifactId >
Original file line number Diff line number Diff line change 141
141
<type >test-jar</type >
142
142
<scope >test</scope >
143
143
</dependency >
144
- <dependency >
145
- <groupId >${project.groupId} </groupId >
146
- <artifactId >cdk-qsar</artifactId >
147
- <version >${project.parent.version} </version >
148
- <type >test-jar</type >
149
- <scope >test</scope >
150
- </dependency >
151
144
<dependency >
152
145
<groupId >${project.groupId} </groupId >
153
146
<artifactId >cdk-qsaratomic</artifactId >
Original file line number Diff line number Diff line change 24
24
import org .junit .Before ;
25
25
import org .junit .Test ;
26
26
import org .openscience .cdk .AtomContainer ;
27
+ import org .openscience .cdk .DefaultChemObjectBuilder ;
27
28
import org .openscience .cdk .interfaces .IAtom ;
28
29
import org .openscience .cdk .interfaces .IAtomContainer ;
29
30
import org .openscience .cdk .interfaces .IBond ;
@@ -39,7 +40,8 @@ public class AcidicGroupCountDescriptorTest extends MolecularDescriptorTest {
39
40
40
41
@ Before
41
42
public void setUp () throws Exception {
42
- setDescriptor (AcidicGroupCountDescriptor .class );
43
+ setDescriptor (AcidicGroupCountDescriptor .class ,
44
+ DefaultChemObjectBuilder .getInstance ());
43
45
}
44
46
45
47
@ Test
Original file line number Diff line number Diff line change 22
22
import org .junit .Before ;
23
23
import org .junit .Test ;
24
24
import org .openscience .cdk .AtomContainer ;
25
+ import org .openscience .cdk .DefaultChemObjectBuilder ;
25
26
import org .openscience .cdk .interfaces .IAtom ;
26
27
import org .openscience .cdk .interfaces .IAtomContainer ;
27
28
import org .openscience .cdk .interfaces .IBond ;
@@ -38,7 +39,8 @@ public class BasicGroupCountDescriptorTest extends MolecularDescriptorTest {
38
39
39
40
@ Before
40
41
public void setUp () throws Exception {
41
- setDescriptor (BasicGroupCountDescriptor .class );
42
+ setDescriptor (BasicGroupCountDescriptor .class ,
43
+ DefaultChemObjectBuilder .getInstance ());
42
44
}
43
45
44
46
@ Test
Original file line number Diff line number Diff line change 69
69
<type >test-jar</type >
70
70
<scope >test</scope >
71
71
</dependency >
72
- <dependency >
73
- <groupId >${project.groupId} </groupId >
74
- <artifactId >cdk-qsar</artifactId >
75
- <version >${project.parent.version} </version >
76
- <type >test-jar</type >
77
- <scope >test</scope >
78
- </dependency >
79
72
<dependency >
80
73
<groupId >${project.groupId} </groupId >
81
74
<artifactId >cdk-testdata</artifactId >
88
81
<artifactId >cdk-qsarmolecular</artifactId >
89
82
<version >${project.parent.version} </version >
90
83
<type >test-jar</type >
91
- <scope >test</scope >
84
+ <scope >test</scope >
92
85
</dependency >
93
86
</dependencies >
94
87
You can’t perform that action at this time.
0 commit comments