Skip to content

Commit d19c524

Browse files
author
emarx
committed
- adding function to test new directory
1 parent a3c8e66 commit d19c524

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

kbox.kibe.test/src/test/java/org/aksw/kbox/kibe/KBoxTest.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package org.aksw.kbox.kibe;
22

33
import static org.junit.Assert.assertEquals;
4+
import static org.junit.Assert.assertTrue;
45

56
import java.io.File;
67
import java.net.MalformedURLException;
78
import java.net.URL;
89

9-
import org.aksw.kbox.kibe.KBox;
1010
import org.aksw.kbox.kibe.tdb.TDBTest;
1111
import org.junit.Test;
1212

@@ -22,10 +22,16 @@ public void testPrintKBs() throws Exception {
2222

2323
@Test
2424
public void testResolveURLWithKBoxKNSService() throws Exception {
25-
URL db = KBox.resolveURL(new URL("http://dbpedia.org/en/full"));
25+
URL db = KBox.resolveURL(new URL("http://dbpedia.org/3.9/en/full"));
2626
assertEquals(db.toString(), "http://vmdbpedia.informatik.uni-leipzig.de:3030/kbox.kb");
2727
}
2828

29+
@Test
30+
public void testNewDir() throws Exception {
31+
File f = KBox.newDir(new URL("http://dbpedia.org/en/full"));
32+
assertTrue(f.getAbsolutePath().endsWith("en\\full"));
33+
}
34+
2935
@Test
3036
public void testInstallProcess() throws Exception {
3137
File indexFile = new File("knowledgebase.idx");

0 commit comments

Comments
 (0)