blob: d8d2b76ae8f7b7c5ceea96fe8e63695ca271ba6e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
package uk.ac.ox.cs.pagoda.global_tests;
import org.testng.annotations.Test;
import uk.ac.ox.cs.pagoda.Pagoda;
import uk.ac.ox.cs.pagoda.util.TestUtil;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
public class TestPagodaFLY {
@Test(groups = {"light"})
public void answersCorrectness_withGJFC() throws IOException {
String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath());
new File(answers.toString()).deleteOnExit();
Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-fly-with-GJ-FC-individuals.json");
Pagoda pagoda = Pagoda.builder()
.ontology(TestUtil.combinePaths(ontoDir, "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl"))
.query(TestUtil.combinePaths(ontoDir, "fly/queries/fly.sparql"))
.answer(answers)
.classify(false)
.hermit(true)
.build();
pagoda.run();
CheckAnswers.assertSameAnswers(answers, givenAnswers);
}
@Test(groups = {"light"})
public void answersCorrectness_rolledUp() throws IOException {
String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath());
new File(answers.toString()).deleteOnExit();
Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-fly-rolledup.json");
Pagoda pagoda = Pagoda.builder()
.ontology(TestUtil.combinePaths(ontoDir, "fly/fly_rolledUp.owl"))
.query(TestUtil.combinePaths(ontoDir, "fly/queries/fly_rolledUp.sparql"))
.answer(answers)
.classify(false)
.hermit(true)
.build();
pagoda.run();
CheckAnswers.assertSameAnswers(answers, givenAnswers);
}
}
|