Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 3919a18c authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- added a test examplifying incorrect cut behaviour

parent 1418c6e4
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.assertNull; import static org.testng.Assert.assertNull;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Configuration; import org.testng.annotations.Configuration;
...@@ -29,8 +30,11 @@ import org.testng.annotations.Test; ...@@ -29,8 +30,11 @@ import org.testng.annotations.Test;
//import org.testng.annotations.*; //import org.testng.annotations.*;
import fr.inrialpes.exmo.align.impl.BasicAlignment; import fr.inrialpes.exmo.align.impl.BasicAlignment;
import fr.inrialpes.exmo.align.impl.URIAlignment;
import fr.inrialpes.exmo.align.parser.AlignmentParser;
import org.semanticweb.owl.align.Alignment; import org.semanticweb.owl.align.Alignment;
import org.semanticweb.owl.align.AlignmentException;
public class BasicAlignmentTest { public class BasicAlignmentTest {
private Alignment alignment = null; private Alignment alignment = null;
...@@ -45,4 +49,18 @@ public class BasicAlignmentTest { ...@@ -45,4 +49,18 @@ public class BasicAlignmentTest {
assertNotNull( alignment, "Alignment was null" ); assertNotNull( alignment, "Alignment was null" );
} }
@Test(groups = { "full", "raw" })
public void someCutTest() throws AlignmentException {
// THIS SHOULD BE REPLACED WITH ALIGNMENT BUILT IN PREVIOUS TESTS
AlignmentParser aparser = new AlignmentParser( 0 );
assertNotNull( aparser, "AlignmentParser was null" );
Alignment result = aparser.parse( "file:examples/rdf/newsample.rdf" );
assertNotNull( result, "URIAlignment(result) was null" );
assertTrue( result instanceof URIAlignment );
assertEquals( result.nbCells(), 2, "Alignment should contain 2 cells" );
result.cut( "hard", .5 );
assertEquals( result.nbCells(), 1, "Alignment should contain 1 cell" );
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment