Skip to content

Commit 0eb1b2c

Browse files
added working RMFA unit test
1 parent f8f27c0 commit 0eb1b2c

File tree

1 file changed

+105
-107
lines changed
  • rulewerk-integrationtests/src/test/java/org/semanticweb/rulewerk/integrationtests/acyclicity

1 file changed

+105
-107
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,105 @@
1-
package org.semanticweb.rulewerk.integrationtests.acyclicity;
2-
3-
import static org.junit.Assert.assertFalse;
4-
5-
/*-
6-
* #%L
7-
* Rulewerk Integration Tests
8-
* %%
9-
* Copyright (C) 2018 - 2021 Rulewerk Developers
10-
* %%
11-
* Licensed under the Apache License, Version 2.0 (the "License");
12-
* you may not use this file except in compliance with the License.
13-
* You may obtain a copy of the License at
14-
*
15-
* http://www.apache.org/licenses/LICENSE-2.0
16-
*
17-
* Unless required by applicable law or agreed to in writing, software
18-
* distributed under the License is distributed on an "AS IS" BASIS,
19-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20-
* See the License for the specific language governing permissions and
21-
* limitations under the License.
22-
* #L%
23-
*/
24-
25-
import static org.junit.Assert.assertTrue;
26-
27-
import org.junit.Ignore;
28-
import org.junit.Test;
29-
import org.semanticweb.rulewerk.core.reasoner.Reasoner;
30-
import org.semanticweb.rulewerk.parser.ParsingException;
31-
32-
public class RMFAIT extends AcyclicityTest {
33-
34-
@Test
35-
public void isRMFA_datalog() throws ParsingException {
36-
try (Reasoner r = this.getReasonerWithKbFromResource("datalog.rls")) {
37-
assertTrue(r.isRMFA());
38-
}
39-
}
40-
41-
@Test
42-
public void isRMFA_nonRecursive() throws ParsingException {
43-
try (Reasoner r = this.getReasonerWithKbFromResource("non-recursive.rls")) {
44-
assertTrue(r.isRMFA());
45-
}
46-
}
47-
48-
@Test
49-
public void isRMFA_JA_1() throws ParsingException {
50-
try (Reasoner r = this.getReasonerWithKbFromResource("JA-1.rls")) {
51-
assertTrue(r.isRMFA());
52-
}
53-
}
54-
55-
@Test
56-
public void isRMFA_RJA_1() throws ParsingException {
57-
try (Reasoner r = this.getReasonerWithKbFromResource("RJA-1.rls")) {
58-
assertTrue(r.isRMFA());
59-
}
60-
}
61-
62-
@Test
63-
public void isRMFA_RJA_2() throws ParsingException {
64-
try (Reasoner r = this.getReasonerWithKbFromResource("RJA-2.rls")) {
65-
assertTrue(r.isRMFA());
66-
}
67-
}
68-
69-
@Test
70-
public void isRMFA_RJA_3() throws ParsingException {
71-
try (Reasoner r = this.getReasonerWithKbFromResource("RJA-3.rls")) {
72-
assertTrue(r.isRMFA());
73-
}
74-
}
75-
76-
@Test
77-
public void isRMFA_MFA_1() throws ParsingException {
78-
try (Reasoner r = this.getReasonerWithKbFromResource("MFA-1.rls")) {
79-
assertTrue(r.isRMFA());
80-
}
81-
}
82-
83-
//FIXME should be RMFA
84-
@Ignore
85-
@Test
86-
public void isRMFA_RMFA_1() throws ParsingException {
87-
try (Reasoner r = this.getReasonerWithKbFromResource("RMFA-1.rls")) {
88-
assertTrue(r.isRMFA());
89-
}
90-
}
91-
92-
// FIXME fix RMFA check
93-
@Ignore
94-
@Test
95-
public void isNotRMFA_MFC_1() throws ParsingException {
96-
try (Reasoner r = this.getReasonerWithKbFromResource("MFC-1.rls")) {
97-
assertFalse(r.isRMFA());
98-
}
99-
}
100-
101-
@Test
102-
public void isNotRMFA_RMFC_1() throws ParsingException {
103-
try (Reasoner r = this.getReasonerWithKbFromResource("RMFC-1.rls")) {
104-
assertFalse(r.isRMFA());
105-
}
106-
}
107-
}
1+
package org.semanticweb.rulewerk.integrationtests.acyclicity;
2+
3+
import static org.junit.Assert.assertFalse;
4+
5+
/*-
6+
* #%L
7+
* Rulewerk Integration Tests
8+
* %%
9+
* Copyright (C) 2018 - 2021 Rulewerk Developers
10+
* %%
11+
* Licensed under the Apache License, Version 2.0 (the "License");
12+
* you may not use this file except in compliance with the License.
13+
* You may obtain a copy of the License at
14+
*
15+
* http://www.apache.org/licenses/LICENSE-2.0
16+
*
17+
* Unless required by applicable law or agreed to in writing, software
18+
* distributed under the License is distributed on an "AS IS" BASIS,
19+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20+
* See the License for the specific language governing permissions and
21+
* limitations under the License.
22+
* #L%
23+
*/
24+
25+
import static org.junit.Assert.assertTrue;
26+
27+
import org.junit.Ignore;
28+
import org.junit.Test;
29+
import org.semanticweb.rulewerk.core.reasoner.Reasoner;
30+
import org.semanticweb.rulewerk.parser.ParsingException;
31+
32+
public class RMFAIT extends AcyclicityTest {
33+
34+
@Test
35+
public void isRMFA_datalog() throws ParsingException {
36+
try (Reasoner r = this.getReasonerWithKbFromResource("datalog.rls")) {
37+
assertTrue(r.isRMFA());
38+
}
39+
}
40+
41+
@Test
42+
public void isRMFA_nonRecursive() throws ParsingException {
43+
try (Reasoner r = this.getReasonerWithKbFromResource("non-recursive.rls")) {
44+
assertTrue(r.isRMFA());
45+
}
46+
}
47+
48+
@Test
49+
public void isRMFA_JA_1() throws ParsingException {
50+
try (Reasoner r = this.getReasonerWithKbFromResource("JA-1.rls")) {
51+
assertTrue(r.isRMFA());
52+
}
53+
}
54+
55+
@Test
56+
public void isRMFA_RJA_1() throws ParsingException {
57+
try (Reasoner r = this.getReasonerWithKbFromResource("RJA-1.rls")) {
58+
assertTrue(r.isRMFA());
59+
}
60+
}
61+
62+
@Test
63+
public void isRMFA_RJA_2() throws ParsingException {
64+
try (Reasoner r = this.getReasonerWithKbFromResource("RJA-2.rls")) {
65+
assertTrue(r.isRMFA());
66+
}
67+
}
68+
69+
@Test
70+
public void isRMFA_RJA_3() throws ParsingException {
71+
try (Reasoner r = this.getReasonerWithKbFromResource("RJA-3.rls")) {
72+
assertTrue(r.isRMFA());
73+
}
74+
}
75+
76+
@Test
77+
public void isRMFA_MFA_1() throws ParsingException {
78+
try (Reasoner r = this.getReasonerWithKbFromResource("MFA-1.rls")) {
79+
assertTrue(r.isRMFA());
80+
}
81+
}
82+
83+
//FIXME should be RMFA
84+
@Ignore
85+
@Test
86+
public void isRMFA_RMFA_1() throws ParsingException {
87+
try (Reasoner r = this.getReasonerWithKbFromResource("RMFA-1.rls")) {
88+
assertTrue(r.isRMFA());
89+
}
90+
}
91+
92+
@Test
93+
public void isNotRMFA_MFC_1() throws ParsingException {
94+
try (Reasoner r = this.getReasonerWithKbFromResource("MFC-1.rls")) {
95+
assertFalse(r.isRMFA());
96+
}
97+
}
98+
99+
@Test
100+
public void isNotRMFA_RMFC_1() throws ParsingException {
101+
try (Reasoner r = this.getReasonerWithKbFromResource("RMFC-1.rls")) {
102+
assertFalse(r.isRMFA());
103+
}
104+
}
105+
}

0 commit comments

Comments
 (0)