From d19c5241b57e7742824a91ebca6fa133042a5f86 Mon Sep 17 00:00:00 2001 From: emarx Date: Fri, 1 Jul 2016 12:41:25 +0200 Subject: [PATCH] - adding function to test new directory --- .../src/test/java/org/aksw/kbox/kibe/KBoxTest.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kbox.kibe.test/src/test/java/org/aksw/kbox/kibe/KBoxTest.java b/kbox.kibe.test/src/test/java/org/aksw/kbox/kibe/KBoxTest.java index 7880aee..8297d2b 100644 --- a/kbox.kibe.test/src/test/java/org/aksw/kbox/kibe/KBoxTest.java +++ b/kbox.kibe.test/src/test/java/org/aksw/kbox/kibe/KBoxTest.java @@ -1,12 +1,12 @@ package org.aksw.kbox.kibe; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import java.io.File; import java.net.MalformedURLException; import java.net.URL; -import org.aksw.kbox.kibe.KBox; import org.aksw.kbox.kibe.tdb.TDBTest; import org.junit.Test; @@ -22,10 +22,16 @@ public void testPrintKBs() throws Exception { @Test public void testResolveURLWithKBoxKNSService() throws Exception { - URL db = KBox.resolveURL(new URL("http://dbpedia.org/en/full")); + URL db = KBox.resolveURL(new URL("http://dbpedia.org/3.9/en/full")); assertEquals(db.toString(), "http://vmdbpedia.informatik.uni-leipzig.de:3030/kbox.kb"); } + @Test + public void testNewDir() throws Exception { + File f = KBox.newDir(new URL("http://dbpedia.org/en/full")); + assertTrue(f.getAbsolutePath().endsWith("en\\full")); + } + @Test public void testInstallProcess() throws Exception { File indexFile = new File("knowledgebase.idx");