Skip to content

Commit

Permalink
BeforeClass method must be static; better clone test
Browse files Browse the repository at this point in the history
  • Loading branch information
gilleain authored and egonw committed Jun 23, 2010
1 parent cd3a866 commit 7e370a2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/test/org/openscience/cdk/signature/OrbitTest.java
Expand Up @@ -40,7 +40,7 @@ public class OrbitTest {
private static Orbit orbit;

@BeforeClass
public void setUp() {
public static void setUp() {

// make a test orbit instance, with a nonsense
// string label, and some number of 'indices'
Expand All @@ -56,7 +56,11 @@ public void setUp() {
@Test
public void testClone() {
Orbit clonedOrbit = (Orbit)orbit.clone();
Assert.assertEquals(clonedOrbit.toString(), orbit.toString());
List<Integer> indices = new ArrayList<Integer>();
for (int i : orbit) { indices.add(i); }
List<Integer> clonedIndices = new ArrayList<Integer>();
for (int i : clonedOrbit) { clonedIndices.add(i); }
Assert.assertEquals(indices, clonedIndices);
}

@Test
Expand Down

0 comments on commit 7e370a2

Please sign in to comment.