Skip to content

Commit

Permalink
a)Assert cleaned and fixed b)Correct ASSERT imports used
Browse files Browse the repository at this point in the history
  • Loading branch information
asad authored and egonw committed Aug 30, 2010
1 parent cb4048e commit a420b61
Showing 1 changed file with 11 additions and 12 deletions.
Expand Up @@ -22,7 +22,6 @@
*/
package org.openscience.cdk.smsd.algorithm.rgraph;

import org.openscience.cdk.smsd.algorithm.rgraph.CDKRMapHandler;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
Expand All @@ -32,8 +31,8 @@
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.Assert;
import org.openscience.cdk.DefaultChemObjectBuilder;
import static org.junit.Assert.*;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.exception.InvalidSmilesException;
import org.openscience.cdk.interfaces.IAtomContainer;
Expand Down Expand Up @@ -76,7 +75,7 @@ public void testGetSource() {
IAtomContainer expResult = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
CDKRMapHandler.setSource(expResult);
IAtomContainer result = CDKRMapHandler.getSource();
assertEquals(expResult, result);
Assert.assertEquals(expResult, result);
}

/**
Expand All @@ -88,7 +87,7 @@ public void testSetSource() {
IAtomContainer expResult = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
CDKRMapHandler.setSource(expResult);
IAtomContainer result = CDKRMapHandler.getSource();
assertEquals(expResult, result);
Assert.assertEquals(expResult, result);
}

/**
Expand All @@ -100,7 +99,7 @@ public void testGetTarget() {
IAtomContainer expResult = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
CDKRMapHandler.setTarget(expResult);
IAtomContainer result = CDKRMapHandler.getTarget();
assertEquals(expResult, result);
Assert.assertEquals(expResult, result);
}

/**
Expand All @@ -112,7 +111,7 @@ public void testSetTarget() {
IAtomContainer expResult = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
CDKRMapHandler.setTarget(expResult);
IAtomContainer result = CDKRMapHandler.getTarget();
assertEquals(expResult, result);
Assert.assertEquals(expResult, result);
}

/**
Expand All @@ -127,7 +126,7 @@ public void testCalculateOverlapsAndReduce() throws Exception {
IAtomContainer Molecule2 = sp.parseSmiles("C1CCCC1");
CDKRMapHandler instance = new CDKRMapHandler();
instance.calculateOverlapsAndReduce(Molecule1, Molecule2, true);
assertNotNull(FinalMappings.getInstance().getSize());
Assert.assertNotNull(FinalMappings.getInstance().getSize());
}

/**
Expand All @@ -143,7 +142,7 @@ public void testCalculateOverlapsAndReduceExactMatch() throws Exception {
CDKRMapHandler instance = new CDKRMapHandler();
instance.calculateOverlapsAndReduceExactMatch(Molecule1, Molecule2, true);
// TODO review the generated test code and remove the default call to fail.
assertNotNull(FinalMappings.getInstance().getSize());
Assert.assertNotNull(FinalMappings.getInstance().getSize());
}

/**
Expand All @@ -159,7 +158,7 @@ public void testGetMappings() throws InvalidSmilesException, CDKException {
CDKRMapHandler instance = new CDKRMapHandler();
instance.calculateOverlapsAndReduceExactMatch(Molecule1, Molecule2, true);
List<Map<Integer, Integer>> result = instance.getMappings();
assertEquals(2, result.size());
Assert.assertEquals(2, result.size());
}

/**
Expand All @@ -176,7 +175,7 @@ public void testSetMappings() {
mappings.add(map);
CDKRMapHandler instance = new CDKRMapHandler();
instance.setMappings(mappings);
assertNotNull(instance.getMappings());
Assert.assertNotNull(instance.getMappings());
}

/**
Expand All @@ -189,7 +188,7 @@ public void testIsTimeoutFlag() {
boolean expResult = true;
instance.setTimeoutFlag(true);
boolean result = instance.isTimeoutFlag();
assertEquals(expResult, result);
Assert.assertEquals(expResult, result);
}

/**
Expand All @@ -201,6 +200,6 @@ public void testSetTimeoutFlag() {
boolean timeoutFlag = false;
CDKRMapHandler instance = new CDKRMapHandler();
instance.setTimeoutFlag(timeoutFlag);
assertNotSame(true, instance.isTimeoutFlag());
Assert.assertNotSame(true, instance.isTimeoutFlag());
}
}

0 comments on commit a420b61

Please sign in to comment.