From c887ff3a59416b07ce32193731defc364ed31554 Mon Sep 17 00:00:00 2001 From: John May Date: Sun, 16 Oct 2016 19:17:35 +0100 Subject: [PATCH] Correct more test with bad atom symbols and symbol visibility due to hcount. --- .../org/openscience/cdk/renderer/SymbolVisibilityTest.java | 2 ++ .../openscience/cdk/renderer/color/CDK2DAtomColorsTest.java | 3 ++- .../org/openscience/cdk/renderer/color/CDKAtomColorsTest.java | 3 ++- .../org/openscience/cdk/renderer/color/CPKAtomColorsTest.java | 3 ++- .../cdk/renderer/color/PartialAtomicChargeColorsTest.java | 3 ++- .../org/openscience/cdk/renderer/color/RasmolColorsTest.java | 3 ++- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/display/render/src/test/java/org/openscience/cdk/renderer/SymbolVisibilityTest.java b/display/render/src/test/java/org/openscience/cdk/renderer/SymbolVisibilityTest.java index 73b223f66a..afd55fe694 100644 --- a/display/render/src/test/java/org/openscience/cdk/renderer/SymbolVisibilityTest.java +++ b/display/render/src/test/java/org/openscience/cdk/renderer/SymbolVisibilityTest.java @@ -77,6 +77,8 @@ public void iupacMethylPreferred() { public void iupacMethylAcceptable() { IAtom a1 = new Atom("C"); IAtom a2 = new Atom("C"); + a1.setImplicitHydrogenCount(null); + a1.setImplicitHydrogenCount(null); IBond bond = new Bond(a1, a2); a1.setPoint2d(new Point2d(0, 0)); a2.setPoint2d(new Point2d(0, 0)); diff --git a/display/render/src/test/java/org/openscience/cdk/renderer/color/CDK2DAtomColorsTest.java b/display/render/src/test/java/org/openscience/cdk/renderer/color/CDK2DAtomColorsTest.java index c2fc5d5381..ce3bad2231 100644 --- a/display/render/src/test/java/org/openscience/cdk/renderer/color/CDK2DAtomColorsTest.java +++ b/display/render/src/test/java/org/openscience/cdk/renderer/color/CDK2DAtomColorsTest.java @@ -27,6 +27,7 @@ import org.junit.Test; import org.openscience.cdk.Atom; import org.openscience.cdk.CDKTestCase; +import org.openscience.cdk.PseudoAtom; import org.openscience.cdk.interfaces.IAtom; /** @@ -51,7 +52,7 @@ public void testGetDefaultAtomColor() { CDK2DAtomColors colors = new CDK2DAtomColors(); Assert.assertNotNull(colors); - IAtom imaginary = new Atom("Ix"); + IAtom imaginary = new PseudoAtom("Ix"); Assert.assertEquals(new Color(0, 0, 0), colors.getAtomColor(imaginary, Color.BLACK)); } } diff --git a/display/render/src/test/java/org/openscience/cdk/renderer/color/CDKAtomColorsTest.java b/display/render/src/test/java/org/openscience/cdk/renderer/color/CDKAtomColorsTest.java index 794efaf088..a7fd7a914e 100644 --- a/display/render/src/test/java/org/openscience/cdk/renderer/color/CDKAtomColorsTest.java +++ b/display/render/src/test/java/org/openscience/cdk/renderer/color/CDKAtomColorsTest.java @@ -28,6 +28,7 @@ import org.junit.Test; import org.openscience.cdk.Atom; import org.openscience.cdk.CDKTestCase; +import org.openscience.cdk.PseudoAtom; import org.openscience.cdk.interfaces.IAtom; /** @@ -52,7 +53,7 @@ public void testGetDefaultAtomColor() { CDKAtomColors colors = new CDKAtomColors(); Assert.assertNotNull(colors); - IAtom imaginary = new Atom("Ix"); + IAtom imaginary = new PseudoAtom("Ix"); Assert.assertEquals(Color.ORANGE, colors.getAtomColor(imaginary, Color.ORANGE)); } } diff --git a/display/render/src/test/java/org/openscience/cdk/renderer/color/CPKAtomColorsTest.java b/display/render/src/test/java/org/openscience/cdk/renderer/color/CPKAtomColorsTest.java index b9aec342da..055af29120 100644 --- a/display/render/src/test/java/org/openscience/cdk/renderer/color/CPKAtomColorsTest.java +++ b/display/render/src/test/java/org/openscience/cdk/renderer/color/CPKAtomColorsTest.java @@ -28,6 +28,7 @@ import org.junit.Test; import org.openscience.cdk.Atom; import org.openscience.cdk.CDKTestCase; +import org.openscience.cdk.PseudoAtom; import org.openscience.cdk.interfaces.IAtom; /** @@ -48,7 +49,7 @@ public void testGetDefaultAtomColor() { CPKAtomColors colors = new CPKAtomColors(); Assert.assertNotNull(colors); - IAtom imaginary = new Atom("Ix"); + IAtom imaginary = new PseudoAtom("Ix"); Assert.assertEquals(Color.ORANGE, colors.getAtomColor(imaginary, Color.ORANGE)); } } diff --git a/display/render/src/test/java/org/openscience/cdk/renderer/color/PartialAtomicChargeColorsTest.java b/display/render/src/test/java/org/openscience/cdk/renderer/color/PartialAtomicChargeColorsTest.java index eafd8b1c30..e0f6098464 100644 --- a/display/render/src/test/java/org/openscience/cdk/renderer/color/PartialAtomicChargeColorsTest.java +++ b/display/render/src/test/java/org/openscience/cdk/renderer/color/PartialAtomicChargeColorsTest.java @@ -27,6 +27,7 @@ import org.junit.Test; import org.openscience.cdk.Atom; import org.openscience.cdk.CDKTestCase; +import org.openscience.cdk.PseudoAtom; import org.openscience.cdk.interfaces.IAtom; /** @@ -51,7 +52,7 @@ public void testGetDefaultAtomColor() { PartialAtomicChargeColors colors = new PartialAtomicChargeColors(); Assert.assertNotNull(colors); - IAtom imaginary = new Atom("Ix"); + IAtom imaginary = new PseudoAtom("Ix"); Assert.assertEquals(Color.ORANGE, colors.getAtomColor(imaginary, Color.ORANGE)); } } diff --git a/display/render/src/test/java/org/openscience/cdk/renderer/color/RasmolColorsTest.java b/display/render/src/test/java/org/openscience/cdk/renderer/color/RasmolColorsTest.java index 0946e51943..14711c6976 100644 --- a/display/render/src/test/java/org/openscience/cdk/renderer/color/RasmolColorsTest.java +++ b/display/render/src/test/java/org/openscience/cdk/renderer/color/RasmolColorsTest.java @@ -27,6 +27,7 @@ import org.openscience.cdk.Atom; import org.openscience.cdk.CDKTestCase; +import org.openscience.cdk.PseudoAtom; import org.openscience.cdk.interfaces.IAtom; /** @@ -51,7 +52,7 @@ public void testGetDefaultAtomColor() { RasmolColors colors = new RasmolColors(); Assert.assertNotNull(colors); - IAtom imaginary = new Atom("Ix"); + IAtom imaginary = new PseudoAtom("Ix"); Assert.assertEquals(Color.ORANGE, colors.getAtomColor(imaginary, Color.ORANGE)); }