diff options
Diffstat (limited to 'subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java')
-rw-r--r-- | subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java b/subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java index 35910e08..ddd57e96 100644 --- a/subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java +++ b/subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java | |||
@@ -7,15 +7,16 @@ package tools.refinery.store.query.literal; | |||
7 | 7 | ||
8 | import org.junit.jupiter.api.Test; | 8 | import org.junit.jupiter.api.Test; |
9 | import tools.refinery.store.query.Constraint; | 9 | import tools.refinery.store.query.Constraint; |
10 | import tools.refinery.store.query.InvalidQueryException; | ||
10 | import tools.refinery.store.query.dnf.Dnf; | 11 | import tools.refinery.store.query.dnf.Dnf; |
12 | import tools.refinery.store.query.dnf.InvalidClauseException; | ||
11 | import tools.refinery.store.query.term.*; | 13 | import tools.refinery.store.query.term.*; |
12 | 14 | ||
13 | import java.util.List; | 15 | import java.util.List; |
14 | import java.util.Set; | 16 | import java.util.Set; |
15 | 17 | ||
16 | import static org.hamcrest.MatcherAssert.assertThat; | 18 | import static org.hamcrest.MatcherAssert.assertThat; |
17 | import static org.hamcrest.Matchers.containsInAnyOrder; | 19 | import static org.hamcrest.Matchers.*; |
18 | import static org.hamcrest.Matchers.empty; | ||
19 | import static org.junit.jupiter.api.Assertions.assertAll; | 20 | import static org.junit.jupiter.api.Assertions.assertAll; |
20 | import static org.junit.jupiter.api.Assertions.assertThrows; | 21 | import static org.junit.jupiter.api.Assertions.assertThrows; |
21 | import static tools.refinery.store.query.literal.Literals.not; | 22 | import static tools.refinery.store.query.literal.Literals.not; |
@@ -57,13 +58,13 @@ class AggregationLiteralTest { | |||
57 | @Test | 58 | @Test |
58 | void missingAggregationVariableTest() { | 59 | void missingAggregationVariableTest() { |
59 | var aggregation = fakeConstraint.aggregateBy(y, INT_SUM, p, z); | 60 | var aggregation = fakeConstraint.aggregateBy(y, INT_SUM, p, z); |
60 | assertThrows(IllegalArgumentException.class, () -> x.assign(aggregation)); | 61 | assertThrows(InvalidQueryException.class, () -> x.assign(aggregation)); |
61 | } | 62 | } |
62 | 63 | ||
63 | @Test | 64 | @Test |
64 | void circularAggregationVariableTest() { | 65 | void circularAggregationVariableTest() { |
65 | var aggregation = fakeConstraint.aggregateBy(x, INT_SUM, p, x); | 66 | var aggregation = fakeConstraint.aggregateBy(x, INT_SUM, p, x); |
66 | assertThrows(IllegalArgumentException.class, () -> x.assign(aggregation)); | 67 | assertThrows(InvalidQueryException.class, () -> x.assign(aggregation)); |
67 | } | 68 | } |
68 | 69 | ||
69 | @Test | 70 | @Test |
@@ -73,7 +74,7 @@ class AggregationLiteralTest { | |||
73 | not(fakeConstraint.call(p, y)), | 74 | not(fakeConstraint.call(p, y)), |
74 | x.assign(fakeConstraint.aggregateBy(y, INT_SUM, p, y)) | 75 | x.assign(fakeConstraint.aggregateBy(y, INT_SUM, p, y)) |
75 | ); | 76 | ); |
76 | assertThrows(IllegalArgumentException.class, builder::build); | 77 | assertThrows(InvalidClauseException.class, builder::build); |
77 | } | 78 | } |
78 | 79 | ||
79 | @Test | 80 | @Test |
@@ -83,6 +84,6 @@ class AggregationLiteralTest { | |||
83 | y.assign(constant(27)), | 84 | y.assign(constant(27)), |
84 | x.assign(fakeConstraint.aggregateBy(y, INT_SUM, p, y)) | 85 | x.assign(fakeConstraint.aggregateBy(y, INT_SUM, p, y)) |
85 | ); | 86 | ); |
86 | assertThrows(IllegalArgumentException.class, builder::build); | 87 | assertThrows(InvalidClauseException.class, builder::build); |
87 | } | 88 | } |
88 | } | 89 | } |