From e294a0f2d65425ec74b516c00c0cd36427f024da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Euzenat?= <Jerome.Euzenat@inria.fr> Date: Sun, 10 Jan 2010 20:06:59 +0000 Subject: [PATCH] - added URI tests --- test/src/OntoTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/src/OntoTest.java b/test/src/OntoTest.java index d424376e..3398ac5c 100644 --- a/test/src/OntoTest.java +++ b/test/src/OntoTest.java @@ -99,6 +99,19 @@ public class OntoTest { assertEquals( onto.getOntology(), "MyBeautifulOntology" ); } + @Test(groups = { "full", "onto", "raw" }, dependsOnMethods = {"basicTest"}) + public void basicServiceTest() throws Exception { + BasicOntology<String> onto = new BasicOntology<String>(); + assertNotNull( onto ); + assertEquals( onto.getFragmentAsLabel( new URI("http://example.com/#123" ) ), "123" ); + assertEquals( onto.getFragmentAsLabel( new URI("http://example.com#123" ) ), "123" ); + assertEquals( onto.getFragmentAsLabel( new URI("http://example.com/aaaa#123" ) ), "123" ); + assertEquals( onto.getFragmentAsLabel( new URI("http://example.com/aaaa/#123" ) ), "123" ); + assertEquals( onto.getFragmentAsLabel( new URI("http://example.com/aaaa/123" ) ), "123" ); + assertEquals( onto.getFragmentAsLabel( new URI("http://example.com/aaaa/123/" ) ), "123" ); + assertEquals( onto.getFragmentAsLabel( new URI("http://example.com/aaaa/123/#" ) ), "" ); + } + @Test(groups = { "full", "onto", "raw" }, dependsOnMethods = {"basicTest"}) public void loadedTest() throws Exception { // load ontologies -- GitLab