diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-11-10 17:25:24 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-11-10 17:25:24 +0100 |
commit | fbd2f59a86d8dbd54dae50ca3c3e27d0642d5806 (patch) | |
tree | 8430a24c3cdfaf9f07035a56f584055f1e65e8e4 /subprojects/store-query-viatra | |
parent | feat(web): backend URL configuration (diff) | |
download | refinery-fbd2f59a86d8dbd54dae50ca3c3e27d0642d5806.tar.gz refinery-fbd2f59a86d8dbd54dae50ca3c3e27d0642d5806.tar.zst refinery-fbd2f59a86d8dbd54dae50ca3c3e27d0642d5806.zip |
feat(store): DataRepresentation reflective type
Diffstat (limited to 'subprojects/store-query-viatra')
2 files changed, 26 insertions, 26 deletions
diff --git a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryTest.java b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryTest.java index ea92b223..a7e09023 100644 --- a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryTest.java +++ b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryTest.java | |||
@@ -20,8 +20,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; | |||
20 | class QueryTest { | 20 | class QueryTest { |
21 | @Test | 21 | @Test |
22 | void typeConstraintTest() { | 22 | void typeConstraintTest() { |
23 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 23 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
24 | Relation<Boolean> asset = new Relation<>("Asset", 1, false); | 24 | Relation<Boolean> asset = new Relation<>("Asset", 1, Boolean.class, false); |
25 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 25 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
26 | 26 | ||
27 | var p1 = new Variable("p1"); | 27 | var p1 = new Variable("p1"); |
@@ -46,8 +46,8 @@ class QueryTest { | |||
46 | 46 | ||
47 | @Test | 47 | @Test |
48 | void relationConstraintTest() { | 48 | void relationConstraintTest() { |
49 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 49 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
50 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.FALSE); | 50 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.class, TruthValue.FALSE); |
51 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 51 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
52 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", | 52 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", |
53 | TruthValue::must); | 53 | TruthValue::must); |
@@ -85,8 +85,8 @@ class QueryTest { | |||
85 | 85 | ||
86 | @Test | 86 | @Test |
87 | void andTest() { | 87 | void andTest() { |
88 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 88 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
89 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.FALSE); | 89 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.class, TruthValue.FALSE); |
90 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 90 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
91 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", | 91 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", |
92 | TruthValue::must); | 92 | TruthValue::must); |
@@ -133,8 +133,8 @@ class QueryTest { | |||
133 | 133 | ||
134 | @Test | 134 | @Test |
135 | void existTest() { | 135 | void existTest() { |
136 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 136 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
137 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.FALSE); | 137 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.class, TruthValue.FALSE); |
138 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 138 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
139 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", | 139 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", |
140 | TruthValue::must); | 140 | TruthValue::must); |
@@ -172,9 +172,9 @@ class QueryTest { | |||
172 | 172 | ||
173 | @Test | 173 | @Test |
174 | void orTest() { | 174 | void orTest() { |
175 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 175 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
176 | Relation<Boolean> animal = new Relation<>("Animal", 1, false); | 176 | Relation<Boolean> animal = new Relation<>("Animal", 1, Boolean.class, false); |
177 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.FALSE); | 177 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.class, TruthValue.FALSE); |
178 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 178 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
179 | RelationView<Boolean> animalView = new KeyOnlyRelationView(animal); | 179 | RelationView<Boolean> animalView = new KeyOnlyRelationView(animal); |
180 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", | 180 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", |
@@ -216,7 +216,7 @@ class QueryTest { | |||
216 | 216 | ||
217 | @Test | 217 | @Test |
218 | void equalityTest() { | 218 | void equalityTest() { |
219 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 219 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
220 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 220 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
221 | 221 | ||
222 | Variable p1 = new Variable("p1"); | 222 | Variable p1 = new Variable("p1"); |
@@ -244,8 +244,8 @@ class QueryTest { | |||
244 | 244 | ||
245 | @Test | 245 | @Test |
246 | void inequalityTest() { | 246 | void inequalityTest() { |
247 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 247 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
248 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.FALSE); | 248 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.class, TruthValue.FALSE); |
249 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 249 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
250 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", | 250 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", |
251 | TruthValue::must); | 251 | TruthValue::must); |
@@ -281,8 +281,8 @@ class QueryTest { | |||
281 | 281 | ||
282 | @Test | 282 | @Test |
283 | void patternCallTest() { | 283 | void patternCallTest() { |
284 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 284 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
285 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.FALSE); | 285 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.class, TruthValue.FALSE); |
286 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 286 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
287 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", | 287 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", |
288 | TruthValue::must); | 288 | TruthValue::must); |
@@ -327,8 +327,8 @@ class QueryTest { | |||
327 | 327 | ||
328 | @Test | 328 | @Test |
329 | void negativePatternCallTest() { | 329 | void negativePatternCallTest() { |
330 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 330 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
331 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.FALSE); | 331 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.class, TruthValue.FALSE); |
332 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 332 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
333 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", | 333 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", |
334 | TruthValue::must); | 334 | TruthValue::must); |
@@ -372,8 +372,8 @@ class QueryTest { | |||
372 | 372 | ||
373 | @Test | 373 | @Test |
374 | void negativeWithQuantificationTest() { | 374 | void negativeWithQuantificationTest() { |
375 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 375 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
376 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.FALSE); | 376 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.class, TruthValue.FALSE); |
377 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 377 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
378 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", | 378 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", |
379 | TruthValue::must); | 379 | TruthValue::must); |
@@ -414,8 +414,8 @@ class QueryTest { | |||
414 | 414 | ||
415 | @Test | 415 | @Test |
416 | void transitivePatternCallTest() { | 416 | void transitivePatternCallTest() { |
417 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 417 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
418 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.FALSE); | 418 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.class, TruthValue.FALSE); |
419 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 419 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
420 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", | 420 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", |
421 | TruthValue::must); | 421 | TruthValue::must); |
@@ -458,8 +458,8 @@ class QueryTest { | |||
458 | 458 | ||
459 | @Test | 459 | @Test |
460 | void countMatchTest() { | 460 | void countMatchTest() { |
461 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 461 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
462 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.FALSE); | 462 | Relation<TruthValue> friend = new Relation<>("friend", 2, TruthValue.class, TruthValue.FALSE); |
463 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 463 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
464 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", | 464 | RelationView<TruthValue> friendMustView = new FilteredRelationView<>(friend, "must", |
465 | TruthValue::must); | 465 | TruthValue::must); |
diff --git a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryTransactionTest.java b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryTransactionTest.java index a555f024..117edd3e 100644 --- a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryTransactionTest.java +++ b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryTransactionTest.java | |||
@@ -19,8 +19,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; | |||
19 | class QueryTransactionTest { | 19 | class QueryTransactionTest { |
20 | @Test | 20 | @Test |
21 | void flushTest() { | 21 | void flushTest() { |
22 | Relation<Boolean> person = new Relation<>("Person", 1, false); | 22 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); |
23 | Relation<Boolean> asset = new Relation<>("Asset", 1, false); | 23 | Relation<Boolean> asset = new Relation<>("Asset", 1, Boolean.class, false); |
24 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); | 24 | RelationView<Boolean> personView = new KeyOnlyRelationView(person); |
25 | 25 | ||
26 | var p1 = new Variable("p1"); | 26 | var p1 = new Variable("p1"); |