Permalink
Browse files

Added testing in the abstract test class for general pattern that get…

…Parameters() should return a non-null List
  • Loading branch information...
1 parent 23f9842 commit cab344a194afbd8bbe5271cfbe1d5c5d6c8cfcc0 @egonw egonw committed with egonw Feb 8, 2012
@@ -27,9 +27,12 @@
import org.openscience.cdk.renderer.ReactionRendererTest;
import org.openscience.cdk.renderer.ReactionSetRendererTest;
import org.openscience.cdk.renderer.generators.AtomContainerBoundsGeneratorTest;
+import org.openscience.cdk.renderer.generators.AtomMassGeneratorTest;
import org.openscience.cdk.renderer.generators.AtomNumberGeneratorTest;
+import org.openscience.cdk.renderer.generators.BoundsGeneratorTest;
import org.openscience.cdk.renderer.generators.ExtendedAtomGeneratorTest;
import org.openscience.cdk.renderer.generators.LonePairGeneratorTest;
+import org.openscience.cdk.renderer.generators.MappingGeneratorTest;
import org.openscience.cdk.renderer.generators.ProductsBoxGeneratorTest;
import org.openscience.cdk.renderer.generators.RadicalGeneratorTest;
import org.openscience.cdk.renderer.generators.ReactantsBoxGeneratorTest;
@@ -61,6 +64,9 @@
RadicalGeneratorTest.class,
LonePairGeneratorTest.class,
AtomContainerBoundsGeneratorTest.class,
- AtomNumberGeneratorTest.class
+ AtomNumberGeneratorTest.class,
+ AtomMassGeneratorTest.class,
+ BoundsGeneratorTest.class,
+ MappingGeneratorTest.class
})
public class MrenderextraTests {}
@@ -51,6 +51,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new AtomContainerBoundsGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -50,6 +50,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new AtomMassGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -51,6 +51,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new AtomNumberGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -51,6 +51,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new BoundsGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -71,6 +71,7 @@ public void setup() {
super.setup();
this.generator = new ExtendedAtomGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -51,6 +51,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new LonePairGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -27,6 +27,7 @@
import junit.framework.Assert;
import org.junit.Before;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.openscience.cdk.interfaces.IReaction;
import org.openscience.cdk.renderer.elements.IRenderingElement;
@@ -37,7 +38,7 @@
public class MappingGeneratorTest extends AbstractGeneratorTest {
private MappingGenerator generator;
-
+
@Override
public Rectangle getCustomCanvas() {
return null;
@@ -51,6 +52,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new MappingGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -62,5 +64,5 @@ public void testEmptyReaction() {
List<IRenderingElement> elements = elementUtil.getAllSimpleElements(root);
Assert.assertEquals(0, elements.size());
}
-
+
}
@@ -50,6 +50,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new ProductsBoxGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -51,6 +51,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new RadicalGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -50,6 +50,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new ReactantsBoxGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -50,6 +50,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new ReactionArrowGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -50,6 +50,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new ReactionBoxGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -50,6 +50,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new ReactionPlusGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test
@@ -50,6 +50,7 @@ public void setup() {
model.registerParameters(new BasicBondGenerator());
this.generator = new ReactionSceneGenerator();
model.registerParameters(generator);
+ super.setTestedGenerator(generator);
}
@Test

0 comments on commit cab344a

Please sign in to comment.