From: <raj...@us...> - 2007-10-25 19:22:24
|
Revision: 9224 http://cdk.svn.sourceforge.net/cdk/?rev=9224&view=rev Author: rajarshi Date: 2007-10-25 12:22:19 -0700 (Thu, 25 Oct 2007) Log Message: ----------- Added a test case for getters and setters Modified Paths: -------------- trunk/cdk/src/org/openscience/cdk/test/pharmacophore/PharmacophoreMatcherTest.java Modified: trunk/cdk/src/org/openscience/cdk/test/pharmacophore/PharmacophoreMatcherTest.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/test/pharmacophore/PharmacophoreMatcherTest.java 2007-10-25 19:15:04 UTC (rev 9223) +++ trunk/cdk/src/org/openscience/cdk/test/pharmacophore/PharmacophoreMatcherTest.java 2007-10-25 19:22:19 UTC (rev 9224) @@ -8,6 +8,7 @@ import org.openscience.cdk.interfaces.IAtomContainer; import org.openscience.cdk.io.iterator.IteratingMDLConformerReader; import org.openscience.cdk.io.iterator.IteratingMDLReader; +import org.openscience.cdk.isomorphism.matchers.IQueryAtomContainer; import org.openscience.cdk.isomorphism.matchers.QueryAtomContainer; import org.openscience.cdk.pharmacophore.PharmacophoreAtom; import org.openscience.cdk.pharmacophore.PharmacophoreMatcher; @@ -25,7 +26,7 @@ public static ConformerContainer conformers = null; - @Before + @Before public void setUp() { } @@ -173,4 +174,21 @@ Assert.assertEquals(1, upmatches.size()); } + + @Test + public void testGetterSetter() { + QueryAtomContainer query = new QueryAtomContainer(); + PharmacophoreQueryAtom arom = new PharmacophoreQueryAtom("A", "c1ccccc1"); + PharmacophoreQueryAtom n1 = new PharmacophoreQueryAtom("BasicAmine", "[NX3;h2,h1,H1,H2;!$(NC=O)]"); + PharmacophoreQueryBond b1 = new PharmacophoreQueryBond(arom, n1, 5.0, 7.0); + query.addAtom(arom); + query.addAtom(n1); + query.addBond(b1); + + PharmacophoreMatcher matcher = new PharmacophoreMatcher(); + matcher.setPharmacophoreQuery(query); + IQueryAtomContainer retQuery = matcher.getPharmacophoreQuery(); + Assert.assertEquals(2, retQuery.getAtomCount()); + Assert.assertEquals(1, retQuery.getBondCount()); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |