Skip to content

Commit

Permalink
Access new instance variables in test.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay authored and egonw committed Apr 9, 2015
1 parent 1438a84 commit 3b021dd
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
*/
public class CDKRMapHandlerTest {

private final CDKRMapHandler handler = new CDKRMapHandler();

public CDKRMapHandlerTest() {}

@BeforeClass
Expand All @@ -67,8 +69,8 @@ public void tearDown() {}
@Test
public void testGetSource() {
IAtomContainer expResult = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
CDKRMapHandler.setSource(expResult);
IAtomContainer result = CDKRMapHandler.getSource();
handler.setSource(expResult);
IAtomContainer result = handler.getSource();
Assert.assertEquals(expResult, result);
}

Expand All @@ -78,8 +80,8 @@ public void testGetSource() {
@Test
public void testSetSource() {
IAtomContainer expResult = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
CDKRMapHandler.setSource(expResult);
IAtomContainer result = CDKRMapHandler.getSource();
handler.setSource(expResult);
IAtomContainer result = handler.getSource();
Assert.assertEquals(expResult, result);
}

Expand All @@ -89,8 +91,8 @@ public void testSetSource() {
@Test
public void testGetTarget() {
IAtomContainer expResult = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
CDKRMapHandler.setTarget(expResult);
IAtomContainer result = CDKRMapHandler.getTarget();
handler.setTarget(expResult);
IAtomContainer result = handler.getTarget();
Assert.assertEquals(expResult, result);
}

Expand All @@ -100,8 +102,8 @@ public void testGetTarget() {
@Test
public void testSetTarget() {
IAtomContainer expResult = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
CDKRMapHandler.setTarget(expResult);
IAtomContainer result = CDKRMapHandler.getTarget();
handler.setTarget(expResult);
IAtomContainer result = handler.getTarget();
Assert.assertEquals(expResult, result);
}

Expand Down

0 comments on commit 3b021dd

Please sign in to comment.