diff --git a/test/src/JWNLTest.java b/test/src/JWNLTest.java index 3acad05e8482fcc76bb8af8c06ef020231c77ecd..724713e1b8a26f904e842d99d22bcdba3a59e4f9 100644 --- a/test/src/JWNLTest.java +++ b/test/src/JWNLTest.java @@ -65,8 +65,8 @@ public class JWNLTest { @Test(groups = { "full", "ling" }) public void routineJWNLAlignmentTest() throws Exception { /* -$ setenv WNDIR -$ java -jar lib/alignwn.jar -D=$WNDIR file://$CWD/examples/rdf/ file://$CWD/examples/rdf/ -i fr.inrialpes.exmo.align.ling.JWNLAlignment -o examples/rdf/JWNL.rdf +$ setenv WNDIR ../WordNet-2.0/dict +$ java -jar lib/procalign.jar -Dwndict=$WNDIR file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl -i fr.inrialpes.exmo.align.ling.JWNLAlignment -o examples/rdf/JWNL.rdf */ Parameters params = new BasicParameters(); //System.getenv("WNDIR"); diff --git a/test/src/OntoTest.java b/test/src/OntoTest.java index a5a174a63740f254ce6c0fd306508d9b68bb63e4..d424376e49cf10804078efb68ad6204cb26061e4 100644 --- a/test/src/OntoTest.java +++ b/test/src/OntoTest.java @@ -18,8 +18,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -//package test.com.acme.dona.dep; - import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNull; @@ -54,15 +52,18 @@ import java.net.URISyntaxException; import java.util.Set; /** - * These tests corresponds to the README file in the main directory + * This test the encapsulation of various ontologies */ +// The following assertion is fundamental for having the AfterClass method +// in the end run properly (otherwise, we have bugs around) +@Test(sequential = true) public class OntoTest { private OntologyFactory factory = null; private Ontology ontology = null; - @Test(groups = { "full", "impl", "raw" }) + @Test(groups = { "full", "onto", "raw" }) public void factoryTest() throws Exception { assertNotNull( OntologyFactory.getDefaultFactory() ); assertTrue( OntologyFactory.getDefaultFactory().equals("fr.inrialpes.exmo.align.onto.owlapi2.OWLAPI2OntologyFactory") ); @@ -76,13 +77,13 @@ public class OntoTest { assertEquals( factory, OntologyFactory.getFactory() ); } - @Test(expectedExceptions = AlignmentException.class, groups = { "full", "impl", "raw" }, dependsOnMethods = {"factoryTest"}) + @Test(expectedExceptions = AlignmentException.class, groups = { "full", "onto", "raw" }, dependsOnMethods = {"factoryTest"}) public void concreteFactoryTest() throws Exception { // not really useful factory.newOntology( null ); } - @Test(groups = { "full", "impl", "raw" }, dependsOnMethods = {"factoryTest"}) + @Test(groups = { "full", "onto", "raw" }, dependsOnMethods = {"factoryTest"}) public void basicTest() throws Exception { // not really useful //factory.newOntology( null ); @@ -98,7 +99,7 @@ public class OntoTest { assertEquals( onto.getOntology(), "MyBeautifulOntology" ); } - @Test(groups = { "full", "impl", "raw" }, dependsOnMethods = {"basicTest"}) + @Test(groups = { "full", "onto", "raw" }, dependsOnMethods = {"basicTest"}) public void loadedTest() throws Exception { // load ontologies OntologyFactory.setDefaultFactory("fr.inrialpes.exmo.align.onto.jena25.JENAOntologyFactory"); @@ -148,7 +149,7 @@ public class OntoTest { onto.unload(); } - @Test(groups = { "full", "impl", "raw" }, dependsOnMethods = {"loadedTest"}) + @Test(groups = { "full", "onto", "raw" }, dependsOnMethods = {"loadedTest"}) public void heavyLoadedTest() throws Exception { // load ontologies OntologyFactory.setDefaultFactory("fr.inrialpes.exmo.align.onto.owlapi2.OWLAPI2OntologyFactory"); @@ -220,15 +221,14 @@ public class OntoTest { onto.unload(); } - @Test(groups = { "full", "impl", "raw" }, dependsOnMethods = {"heavyLoadedTest"}) + @Test(groups = { "full", "onto", "raw" }, dependsOnMethods = {"heavyLoadedTest"}) public void cleanUpTest() throws Exception { OntologyFactory.getFactory().clear(); // Check if things remain or not... } - @AfterClass(groups = { "full", "impl", "raw" }) + @AfterClass(groups = { "onto", "raw", "full" }, alwaysRun = true ) public void tearDown() throws Exception { - //System.err.println("I have been executed"); OntologyFactory.setDefaultFactory("fr.inrialpes.exmo.align.onto.owlapi2.OWLAPI2OntologyFactory"); } diff --git a/test/src/READMETest.java b/test/src/READMETest.java index 016dfba1445f98eef37ccdceef13e3b805319d48..b6c0ba835c73312311f8763d7706b900f84f72ea 100644 --- a/test/src/READMETest.java +++ b/test/src/READMETest.java @@ -138,16 +138,14 @@ $ java -jar lib/procalign.jar file://$CWD/examples/rdf/onto1.owl file://$CWD/exa public void routineTest7() throws Exception { /* $ java -jar lib/Procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl - *//* + */ Parameters params = new BasicParameters(); alignment = new StringDistAlignment(); assertNotNull( alignment, "ObjectAlignment should not be null" ); assertEquals( alignment.nbCells(), 0 ); - //alignment.init( new URI("file:examples/rdf/edu.mit.visus.bibtex.owl"), new URI("file:examples/rdf/edu.mit.visus.bibtex.owl")); - alignment.init( new URI("file:examples/rdf/edu.umbc.ebiquity.publication.owl"), new URI("file:examples/rdf/edu.mit.visus.bibtex.owl")); + alignment.init( new URI("file:examples/rdf/edu.umbc.ebiquity.publication.owl"), new URI("file:examples/rdf/edu.mit.visus.bibtex.owl")); alignment.align( (Alignment)null, params ); assertEquals( alignment.nbCells(), 10 ); - */ } @Test(groups = { "full", "impl", "raw" }, dependsOnMethods = {"routineTest7"}) @@ -293,11 +291,4 @@ $ java -jar lib/Procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publica */ } - @Test(groups = { "full", "impl", "raw" }, dependsOnMethods = {"routineTest3"}) - public void routineJWNLTest() throws Exception { - /* -$ setenv WNDIR ../WordNet-2.0/dict -$ java -jar lib/alignwn.jar -Dwndict=$WNDIR file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl -i fr.inrialpes.exmo.align.ling.JWNLAlignment -o examples/rdf/JWNL.rdf - */ - } }