From: <raj...@us...> - 2008-10-25 20:09:51
|
Revision: 12800 http://cdk.svn.sourceforge.net/cdk/?rev=12800&view=rev Author: rajarshi Date: 2008-10-25 20:09:45 +0000 (Sat, 25 Oct 2008) Log Message: ----------- Updated to use JUnit4 annotations Modified Paths: -------------- cdk/branches/cdk-1.2.x/src/test/org/openscience/cdk/qsar/descriptors/bond/BondDescriptorTest.java Modified: cdk/branches/cdk-1.2.x/src/test/org/openscience/cdk/qsar/descriptors/bond/BondDescriptorTest.java =================================================================== --- cdk/branches/cdk-1.2.x/src/test/org/openscience/cdk/qsar/descriptors/bond/BondDescriptorTest.java 2008-10-25 15:01:11 UTC (rev 12799) +++ cdk/branches/cdk-1.2.x/src/test/org/openscience/cdk/qsar/descriptors/bond/BondDescriptorTest.java 2008-10-25 20:09:45 UTC (rev 12800) @@ -20,9 +20,9 @@ */ package org.openscience.cdk.qsar.descriptors.bond; -import javax.vecmath.Point3d; - import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import org.openscience.cdk.DefaultChemObjectBuilder; import org.openscience.cdk.exception.CDKException; import org.openscience.cdk.interfaces.IAtom; @@ -34,6 +34,8 @@ import org.openscience.cdk.qsar.descriptors.DescriptorTest; import org.openscience.cdk.tools.diff.BondDiff; +import javax.vecmath.Point3d; + /** * Tests for bond descriptors. * @@ -44,8 +46,9 @@ protected IBondDescriptor descriptor; public BondDescriptorTest() {} - - public void setDescriptor(Class descriptorClass) throws Exception { + + @Before + public void setDescriptor(Class descriptorClass) throws Exception { if (descriptor == null) { Object descriptor = descriptorClass.newInstance(); if (!(descriptor instanceof IBondDescriptor)) { @@ -56,6 +59,7 @@ super.setDescriptor(descriptorClass); } + @Test public void testCalculate_IBond_IAtomContainer() throws Exception { IAtomContainer mol = someoneBringMeSomeWater(); @@ -77,6 +81,7 @@ * * @throws Exception Passed on from calculate. */ + @Test public void testLabels() throws Exception { IAtomContainer mol = someoneBringMeSomeWater(); @@ -116,7 +121,8 @@ * Also ensure that the number of actual values matches the length * of the names */ - public void testNamesConsistency() { + @Test + public void testNamesConsistency() { IAtomContainer mol = someoneBringMeSomeWater(); String[] names1 = descriptor.getDescriptorNames(); @@ -128,8 +134,9 @@ int valueCount = v.getValue().length(); Assert.assertEquals(valueCount, names1.length); - } + } + @Test public void testCalculate_NoModifications() throws Exception { IAtomContainer mol = someoneBringMeSomeWater(); IBond bond = mol.getBond(0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |