diff options
author | Kristóf Marussy <kristof@marussy.com> | 2023-01-23 20:27:55 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2023-01-29 00:02:28 +0100 |
commit | d91acf3690682d243dbc150df902525b6e545c2f (patch) | |
tree | f39695cc193828df0b78030b5a56bd968e277457 /subprojects/store/src/test | |
parent | chore(deps): bump dependencies (diff) | |
download | refinery-d91acf3690682d243dbc150df902525b6e545c2f.tar.gz refinery-d91acf3690682d243dbc150df902525b6e545c2f.tar.zst refinery-d91acf3690682d243dbc150df902525b6e545c2f.zip |
refactor: Model store and query API
Use Adapters to simplify API usage.
Diffstat (limited to 'subprojects/store/src/test')
-rw-r--r-- | subprojects/store/src/test/java/tools/refinery/store/map/tests/MapUnitTests.java | 9 | ||||
-rw-r--r-- | subprojects/store/src/test/java/tools/refinery/store/model/hashtests/HashEfficiencyTest.java (renamed from subprojects/store/src/test/java/tools/refinery/store/model/hashTests/HashEfficiencyTest.java) | 2 | ||||
-rw-r--r-- | subprojects/store/src/test/java/tools/refinery/store/model/tests/ModelTest.java | 190 | ||||
-rw-r--r-- | subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/CardinalityIntervalTest.java (renamed from subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/CardinalityIntervalTest.java) | 5 | ||||
-rw-r--r-- | subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/CardinalityIntervalsTest.java (renamed from subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/CardinalityIntervalsTest.java) | 4 | ||||
-rw-r--r-- | subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/EmptyCardinalityIntervalTest.java (renamed from subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/EmptyCardinalityIntervalTest.java) | 3 | ||||
-rw-r--r-- | subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/FiniteCardinalityIntervalTest.java (renamed from subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/FiniteCardinalityIntervalTest.java) | 5 | ||||
-rw-r--r-- | subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/FiniteUpperCardinalityTest.java (renamed from subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/FiniteUpperCardinalityTest.java) | 3 | ||||
-rw-r--r-- | subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalitiesTest.java (renamed from subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/UpperCardinalitiesTest.java) | 5 | ||||
-rw-r--r-- | subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalityTest.java (renamed from subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/UpperCardinalityTest.java) | 4 |
10 files changed, 123 insertions, 107 deletions
diff --git a/subprojects/store/src/test/java/tools/refinery/store/map/tests/MapUnitTests.java b/subprojects/store/src/test/java/tools/refinery/store/map/tests/MapUnitTests.java index 081112cc..77c62305 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/map/tests/MapUnitTests.java +++ b/subprojects/store/src/test/java/tools/refinery/store/map/tests/MapUnitTests.java | |||
@@ -1,18 +1,17 @@ | |||
1 | package tools.refinery.store.map.tests; | 1 | package tools.refinery.store.map.tests; |
2 | 2 | ||
3 | import static org.junit.jupiter.api.Assertions.assertEquals; | ||
4 | |||
5 | import org.junit.jupiter.api.Test; | 3 | import org.junit.jupiter.api.Test; |
6 | |||
7 | import tools.refinery.store.map.VersionedMapStore; | 4 | import tools.refinery.store.map.VersionedMapStore; |
8 | import tools.refinery.store.map.VersionedMapStoreImpl; | 5 | import tools.refinery.store.map.VersionedMapStoreImpl; |
9 | import tools.refinery.store.tuple.Tuple; | ||
10 | import tools.refinery.store.model.TupleHashProvider; | 6 | import tools.refinery.store.model.TupleHashProvider; |
7 | import tools.refinery.store.tuple.Tuple; | ||
8 | |||
9 | import static org.junit.jupiter.api.Assertions.assertEquals; | ||
11 | 10 | ||
12 | class MapUnitTests { | 11 | class MapUnitTests { |
13 | @Test | 12 | @Test |
14 | void defaultTest() { | 13 | void defaultTest() { |
15 | VersionedMapStore<Tuple, Boolean> store = new VersionedMapStoreImpl<Tuple, Boolean>(TupleHashProvider.singleton(), false); | 14 | VersionedMapStore<Tuple, Boolean> store = new VersionedMapStoreImpl<>(TupleHashProvider.INSTANCE, false); |
16 | var map = store.createMap(); | 15 | var map = store.createMap(); |
17 | var out1 = map.put(Tuple.of(0), true); | 16 | var out1 = map.put(Tuple.of(0), true); |
18 | assertEquals(false, out1); | 17 | assertEquals(false, out1); |
diff --git a/subprojects/store/src/test/java/tools/refinery/store/model/hashTests/HashEfficiencyTest.java b/subprojects/store/src/test/java/tools/refinery/store/model/hashtests/HashEfficiencyTest.java index ceec40f5..bb083805 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/model/hashTests/HashEfficiencyTest.java +++ b/subprojects/store/src/test/java/tools/refinery/store/model/hashtests/HashEfficiencyTest.java | |||
@@ -1,4 +1,4 @@ | |||
1 | package tools.refinery.store.model.hashTests; | 1 | package tools.refinery.store.model.hashtests; |
2 | 2 | ||
3 | import static org.junit.jupiter.api.Assertions.assertEquals; | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; |
4 | 4 | ||
diff --git a/subprojects/store/src/test/java/tools/refinery/store/model/tests/ModelTest.java b/subprojects/store/src/test/java/tools/refinery/store/model/tests/ModelTest.java index 7a89daeb..e7bff1f9 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/model/tests/ModelTest.java +++ b/subprojects/store/src/test/java/tools/refinery/store/model/tests/ModelTest.java | |||
@@ -1,145 +1,149 @@ | |||
1 | package tools.refinery.store.model.tests; | 1 | package tools.refinery.store.model.tests; |
2 | 2 | ||
3 | import org.junit.jupiter.api.Test; | 3 | import org.junit.jupiter.api.Test; |
4 | import tools.refinery.store.model.Model; | ||
5 | import tools.refinery.store.model.ModelStore; | 4 | import tools.refinery.store.model.ModelStore; |
6 | import tools.refinery.store.model.ModelStoreImpl; | 5 | import tools.refinery.store.representation.Symbol; |
7 | import tools.refinery.store.model.representation.Relation; | ||
8 | import tools.refinery.store.tuple.Tuple; | 6 | import tools.refinery.store.tuple.Tuple; |
9 | 7 | ||
10 | import java.util.Set; | ||
11 | |||
12 | import static org.junit.jupiter.api.Assertions.*; | 8 | import static org.junit.jupiter.api.Assertions.*; |
13 | 9 | ||
14 | class ModelTest { | 10 | class ModelTest { |
15 | |||
16 | @Test | 11 | @Test |
17 | void modelConstructionTest() { | 12 | void modelConstructionTest() { |
18 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); | 13 | var person = new Symbol<>("Person", 1, Boolean.class, false); |
19 | Relation<Boolean> friend = new Relation<>("friend", 2, Boolean.class, false); | 14 | var friend = new Symbol<>("friend", 2, Boolean.class, false); |
20 | 15 | ||
21 | ModelStore store = new ModelStoreImpl(Set.of(person, friend)); | 16 | var store = ModelStore.builder().symbols(person, friend).build(); |
22 | Model model = store.createModel(); | 17 | var symbols = store.getSymbols(); |
23 | 18 | ||
24 | assertTrue(store.getDataRepresentations().contains(person)); | 19 | assertTrue(symbols.contains(person)); |
25 | assertTrue(store.getDataRepresentations().contains(friend)); | 20 | assertTrue(symbols.contains(friend)); |
26 | assertTrue(model.getDataRepresentations().contains(person)); | ||
27 | assertTrue(model.getDataRepresentations().contains(friend)); | ||
28 | 21 | ||
29 | Relation<Integer> other = new Relation<Integer>("other", 2, Integer.class, null); | 22 | var other = new Symbol<>("other", 2, Integer.class, null); |
30 | assertFalse(model.getDataRepresentations().contains(other)); | 23 | assertFalse(symbols.contains(other)); |
31 | } | 24 | } |
32 | 25 | ||
33 | @Test | 26 | @Test |
34 | void modelBuildingTest() { | 27 | void modelBuildingTest() { |
35 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); | 28 | var person = new Symbol<>("Person", 1, Boolean.class, false); |
36 | Relation<Integer> age = new Relation<Integer>("age", 1, Integer.class, null); | 29 | var age = new Symbol<>("age", 1, Integer.class, null); |
37 | Relation<Boolean> friend = new Relation<>("friend", 2, Boolean.class, false); | 30 | var friend = new Symbol<>("friend", 2, Boolean.class, false); |
38 | 31 | ||
39 | ModelStore store = new ModelStoreImpl(Set.of(person, age, friend)); | 32 | var store = ModelStore.builder().symbols(person, age, friend).build(); |
40 | Model model = store.createModel(); | 33 | var model = store.createModel(); |
41 | 34 | var personInterpretation = model.getInterpretation(person); | |
42 | model.put(person, Tuple.of(0), true); | 35 | var ageInterpretation = model.getInterpretation(age); |
43 | model.put(person, Tuple.of(1), true); | 36 | var friendInterpretation = model.getInterpretation(friend); |
44 | model.put(age, Tuple.of(0), 3); | 37 | |
45 | model.put(age, Tuple.of(1), 1); | 38 | personInterpretation.put(Tuple.of(0), true); |
46 | model.put(friend, Tuple.of(0, 1), true); | 39 | personInterpretation.put(Tuple.of(1), true); |
47 | model.put(friend, Tuple.of(1, 0), true); | 40 | ageInterpretation.put(Tuple.of(0), 3); |
48 | 41 | ageInterpretation.put(Tuple.of(1), 1); | |
49 | assertTrue(model.get(person, Tuple.of(0))); | 42 | friendInterpretation.put(Tuple.of(0, 1), true); |
50 | assertTrue(model.get(person, Tuple.of(1))); | 43 | friendInterpretation.put(Tuple.of(1, 0), true); |
51 | assertFalse(model.get(person, Tuple.of(2))); | 44 | |
52 | 45 | assertTrue(personInterpretation.get(Tuple.of(0))); | |
53 | assertEquals(3, model.get(age, Tuple.of(0))); | 46 | assertTrue(personInterpretation.get(Tuple.of(1))); |
54 | assertEquals(1, model.get(age, Tuple.of(1))); | 47 | assertFalse(personInterpretation.get(Tuple.of(2))); |
55 | assertNull(model.get(age, Tuple.of(2))); | 48 | |
56 | 49 | assertEquals(3, ageInterpretation.get(Tuple.of(0))); | |
57 | assertTrue(model.get(friend, Tuple.of(0, 1))); | 50 | assertEquals(1, ageInterpretation.get(Tuple.of(1))); |
58 | assertFalse(model.get(friend, Tuple.of(0, 5))); | 51 | assertNull(ageInterpretation.get( Tuple.of(2))); |
52 | |||
53 | assertTrue(friendInterpretation.get(Tuple.of(0, 1))); | ||
54 | assertFalse(friendInterpretation.get(Tuple.of(0, 5))); | ||
59 | } | 55 | } |
60 | 56 | ||
61 | @Test | 57 | @Test |
62 | void modelBuildingArityFailTest() { | 58 | void modelBuildingArityFailTest() { |
63 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); | 59 | var person = new Symbol<>("Person", 1, Boolean.class, false); |
64 | 60 | ||
65 | ModelStore store = new ModelStoreImpl(Set.of(person)); | 61 | var store = ModelStore.builder().symbols(person).build(); |
66 | Model model = store.createModel(); | 62 | var model = store.createModel(); |
63 | var personInterpretation = model.getInterpretation(person); | ||
67 | 64 | ||
68 | final Tuple tuple3 = Tuple.of(1, 1, 1); | 65 | final Tuple tuple3 = Tuple.of(1, 1, 1); |
69 | assertThrows(IllegalArgumentException.class, () -> model.put(person, tuple3, true)); | 66 | assertThrows(IllegalArgumentException.class, () -> personInterpretation.put(tuple3, true)); |
70 | assertThrows(IllegalArgumentException.class, () -> model.get(person, tuple3)); | 67 | assertThrows(IllegalArgumentException.class, () -> personInterpretation.get(tuple3)); |
71 | } | 68 | } |
72 | 69 | ||
73 | @Test | 70 | @Test |
74 | void modelBuildingNullFailTest() { | 71 | void modelBuildingNullFailTest() { |
75 | Relation<Integer> age = new Relation<Integer>("age", 1, Integer.class, null); | 72 | var age = new Symbol<>("age", 1, Integer.class, null); |
76 | ModelStore store = new ModelStoreImpl(Set.of(age)); | 73 | |
77 | Model model = store.createModel(); | 74 | var store = ModelStore.builder().symbols(age).build(); |
75 | var model = store.createModel(); | ||
76 | var ageInterpretation = model.getInterpretation(age); | ||
78 | 77 | ||
79 | model.put(age, Tuple.of(1), null); // valid | 78 | ageInterpretation.put(Tuple.of(1), null); // valid |
80 | assertThrows(IllegalArgumentException.class, () -> model.put(age, null, 1)); | 79 | assertThrows(IllegalArgumentException.class, () -> ageInterpretation.put(null, 1)); |
81 | assertThrows(IllegalArgumentException.class, () -> model.get(age, null)); | 80 | assertThrows(IllegalArgumentException.class, () -> ageInterpretation.get(null)); |
82 | 81 | ||
83 | } | 82 | } |
84 | 83 | ||
85 | @Test | 84 | @Test |
86 | void modelUpdateTest() { | 85 | void modelUpdateTest() { |
87 | Relation<Boolean> person = new Relation<>("Person", 1, Boolean.class, false); | 86 | var person = new Symbol<>("Person", 1, Boolean.class, false); |
88 | Relation<Integer> age = new Relation<Integer>("age", 1, Integer.class, null); | 87 | var age = new Symbol<>("age", 1, Integer.class, null); |
89 | Relation<Boolean> friend = new Relation<>("friend", 2, Boolean.class, false); | 88 | var friend = new Symbol<>("friend", 2, Boolean.class, false); |
90 | 89 | ||
91 | ModelStore store = new ModelStoreImpl(Set.of(person, age, friend)); | 90 | var store = ModelStore.builder().symbols(person, age, friend).build(); |
92 | Model model = store.createModel(); | 91 | var model = store.createModel(); |
93 | 92 | var personInterpretation = model.getInterpretation(person); | |
94 | model.put(person, Tuple.of(0), true); | 93 | var ageInterpretation = model.getInterpretation(age); |
95 | model.put(person, Tuple.of(1), true); | 94 | var friendInterpretation = model.getInterpretation(friend); |
96 | model.put(age, Tuple.of(0), 3); | 95 | |
97 | model.put(age, Tuple.of(1), 1); | 96 | personInterpretation.put(Tuple.of(0), true); |
98 | model.put(friend, Tuple.of(0, 1), true); | 97 | personInterpretation.put(Tuple.of(1), true); |
99 | model.put(friend, Tuple.of(1, 0), true); | 98 | ageInterpretation.put(Tuple.of(0), 3); |
100 | 99 | ageInterpretation.put(Tuple.of(1), 1); | |
101 | assertEquals(3, model.get(age, Tuple.of(0))); | 100 | friendInterpretation.put(Tuple.of(0, 1), true); |
102 | assertTrue(model.get(friend, Tuple.of(0, 1))); | 101 | friendInterpretation.put(Tuple.of(1, 0), true); |
103 | 102 | ||
104 | model.put(age, Tuple.of(0), 4); | 103 | assertEquals(3, ageInterpretation.get(Tuple.of(0))); |
105 | model.put(friend, Tuple.of(0, 1), false); | 104 | assertTrue(friendInterpretation.get(Tuple.of(0, 1))); |
106 | 105 | ||
107 | assertEquals(4, model.get(age, Tuple.of(0))); | 106 | ageInterpretation.put(Tuple.of(0), 4); |
108 | assertFalse(model.get(friend, Tuple.of(0, 1))); | 107 | friendInterpretation.put(Tuple.of(0, 1), false); |
108 | |||
109 | assertEquals(4, ageInterpretation.get(Tuple.of(0))); | ||
110 | assertFalse(friendInterpretation.get(Tuple.of(0, 1))); | ||
109 | } | 111 | } |
110 | 112 | ||
111 | @Test | 113 | @Test |
112 | void restoreTest() { | 114 | void restoreTest() { |
113 | Relation<Boolean> person = new Relation<Boolean>("Person", 1, Boolean.class, false); | 115 | var person = new Symbol<>("Person", 1, Boolean.class, false); |
114 | Relation<Boolean> friend = new Relation<Boolean>("friend", 2, Boolean.class, false); | 116 | var friend = new Symbol<>("friend", 2, Boolean.class, false); |
115 | 117 | ||
116 | ModelStore store = new ModelStoreImpl(Set.of(person, friend)); | 118 | var store = ModelStore.builder().symbols(person, friend).build(); |
117 | Model model = store.createModel(); | 119 | var model = store.createModel(); |
118 | 120 | var personInterpretation = model.getInterpretation(person); | |
119 | model.put(person, Tuple.of(0), true); | 121 | var friendInterpretation = model.getInterpretation(friend); |
120 | model.put(person, Tuple.of(1), true); | 122 | |
121 | model.put(friend, Tuple.of(0, 1), true); | 123 | personInterpretation.put(Tuple.of(0), true); |
122 | model.put(friend, Tuple.of(1, 0), true); | 124 | personInterpretation.put(Tuple.of(1), true); |
125 | friendInterpretation.put(Tuple.of(0, 1), true); | ||
126 | friendInterpretation.put(Tuple.of(1, 0), true); | ||
123 | long state1 = model.commit(); | 127 | long state1 = model.commit(); |
124 | 128 | ||
125 | assertFalse(model.get(person, Tuple.of(2))); | 129 | assertFalse(personInterpretation.get(Tuple.of(2))); |
126 | assertFalse(model.get(friend, Tuple.of(0, 2))); | 130 | assertFalse(friendInterpretation.get(Tuple.of(0, 2))); |
127 | 131 | ||
128 | model.put(person, Tuple.of(2), true); | 132 | personInterpretation.put(Tuple.of(2), true); |
129 | model.put(friend, Tuple.of(0, 2), true); | 133 | friendInterpretation.put(Tuple.of(0, 2), true); |
130 | long state2 = model.commit(); | 134 | long state2 = model.commit(); |
131 | 135 | ||
132 | assertTrue(model.get(person, Tuple.of(2))); | 136 | assertTrue(personInterpretation.get(Tuple.of(2))); |
133 | assertTrue(model.get(friend, Tuple.of(0, 2))); | 137 | assertTrue(friendInterpretation.get(Tuple.of(0, 2))); |
134 | 138 | ||
135 | model.restore(state1); | 139 | model.restore(state1); |
136 | 140 | ||
137 | assertFalse(model.get(person, Tuple.of(2))); | 141 | assertFalse(personInterpretation.get(Tuple.of(2))); |
138 | assertFalse(model.get(friend, Tuple.of(0, 2))); | 142 | assertFalse(friendInterpretation.get(Tuple.of(0, 2))); |
139 | 143 | ||
140 | model.restore(state2); | 144 | model.restore(state2); |
141 | 145 | ||
142 | assertTrue(model.get(person, Tuple.of(2))); | 146 | assertTrue(personInterpretation.get(Tuple.of(2))); |
143 | assertTrue(model.get(friend, Tuple.of(0, 2))); | 147 | assertTrue(friendInterpretation.get(Tuple.of(0, 2))); |
144 | } | 148 | } |
145 | } | 149 | } |
diff --git a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/CardinalityIntervalTest.java b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/CardinalityIntervalTest.java index 8a39b9b5..96fdc49e 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/CardinalityIntervalTest.java +++ b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/CardinalityIntervalTest.java | |||
@@ -1,14 +1,15 @@ | |||
1 | package tools.refinery.store.model.representation.cardinality; | 1 | package tools.refinery.store.representation.cardinality; |
2 | 2 | ||
3 | import org.junit.jupiter.params.ParameterizedTest; | 3 | import org.junit.jupiter.params.ParameterizedTest; |
4 | import org.junit.jupiter.params.provider.Arguments; | 4 | import org.junit.jupiter.params.provider.Arguments; |
5 | import org.junit.jupiter.params.provider.MethodSource; | 5 | import org.junit.jupiter.params.provider.MethodSource; |
6 | import tools.refinery.store.representation.cardinality.CardinalityInterval; | ||
6 | 7 | ||
7 | import java.util.stream.Stream; | 8 | import java.util.stream.Stream; |
8 | 9 | ||
9 | import static org.hamcrest.MatcherAssert.assertThat; | 10 | import static org.hamcrest.MatcherAssert.assertThat; |
10 | import static org.hamcrest.Matchers.equalTo; | 11 | import static org.hamcrest.Matchers.equalTo; |
11 | import static tools.refinery.store.model.representation.cardinality.CardinalityIntervals.*; | 12 | import static tools.refinery.store.representation.cardinality.CardinalityIntervals.*; |
12 | 13 | ||
13 | class CardinalityIntervalTest { | 14 | class CardinalityIntervalTest { |
14 | @ParameterizedTest(name = "min({0}, {1}) == {2}") | 15 | @ParameterizedTest(name = "min({0}, {1}) == {2}") |
diff --git a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/CardinalityIntervalsTest.java b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/CardinalityIntervalsTest.java index ef68a607..4a9ef8da 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/CardinalityIntervalsTest.java +++ b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/CardinalityIntervalsTest.java | |||
@@ -1,6 +1,8 @@ | |||
1 | package tools.refinery.store.model.representation.cardinality; | 1 | package tools.refinery.store.representation.cardinality; |
2 | 2 | ||
3 | import org.junit.jupiter.api.Test; | 3 | import org.junit.jupiter.api.Test; |
4 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | ||
5 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
4 | 6 | ||
5 | import static org.hamcrest.MatcherAssert.assertThat; | 7 | import static org.hamcrest.MatcherAssert.assertThat; |
6 | import static org.hamcrest.Matchers.*; | 8 | import static org.hamcrest.Matchers.*; |
diff --git a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/EmptyCardinalityIntervalTest.java b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/EmptyCardinalityIntervalTest.java index 41c884ec..e8b77b9f 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/EmptyCardinalityIntervalTest.java +++ b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/EmptyCardinalityIntervalTest.java | |||
@@ -1,6 +1,7 @@ | |||
1 | package tools.refinery.store.model.representation.cardinality; | 1 | package tools.refinery.store.representation.cardinality; |
2 | 2 | ||
3 | import org.junit.jupiter.api.Test; | 3 | import org.junit.jupiter.api.Test; |
4 | import tools.refinery.store.representation.cardinality.CardinalityIntervals; | ||
4 | 5 | ||
5 | import static org.hamcrest.MatcherAssert.assertThat; | 6 | import static org.hamcrest.MatcherAssert.assertThat; |
6 | import static org.hamcrest.Matchers.lessThan; | 7 | import static org.hamcrest.Matchers.lessThan; |
diff --git a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/FiniteCardinalityIntervalTest.java b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/FiniteCardinalityIntervalTest.java index dfb37786..9a190818 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/FiniteCardinalityIntervalTest.java +++ b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/FiniteCardinalityIntervalTest.java | |||
@@ -1,6 +1,9 @@ | |||
1 | package tools.refinery.store.model.representation.cardinality; | 1 | package tools.refinery.store.representation.cardinality; |
2 | 2 | ||
3 | import org.junit.jupiter.api.Test; | 3 | import org.junit.jupiter.api.Test; |
4 | import tools.refinery.store.representation.cardinality.NonEmptyCardinalityInterval; | ||
5 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
6 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
4 | 7 | ||
5 | import static org.junit.jupiter.api.Assertions.assertThrows; | 8 | import static org.junit.jupiter.api.Assertions.assertThrows; |
6 | 9 | ||
diff --git a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/FiniteUpperCardinalityTest.java b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/FiniteUpperCardinalityTest.java index 3f0f7a4a..90c21759 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/FiniteUpperCardinalityTest.java +++ b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/FiniteUpperCardinalityTest.java | |||
@@ -1,6 +1,7 @@ | |||
1 | package tools.refinery.store.model.representation.cardinality; | 1 | package tools.refinery.store.representation.cardinality; |
2 | 2 | ||
3 | import org.junit.jupiter.api.Test; | 3 | import org.junit.jupiter.api.Test; |
4 | import tools.refinery.store.representation.cardinality.FiniteUpperCardinality; | ||
4 | 5 | ||
5 | import static org.junit.jupiter.api.Assertions.assertThrows; | 6 | import static org.junit.jupiter.api.Assertions.assertThrows; |
6 | 7 | ||
diff --git a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/UpperCardinalitiesTest.java b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalitiesTest.java index 13171ae5..3c7c0320 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/UpperCardinalitiesTest.java +++ b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalitiesTest.java | |||
@@ -1,8 +1,11 @@ | |||
1 | package tools.refinery.store.model.representation.cardinality; | 1 | package tools.refinery.store.representation.cardinality; |
2 | 2 | ||
3 | import org.junit.jupiter.api.Test; | 3 | import org.junit.jupiter.api.Test; |
4 | import org.junit.jupiter.params.ParameterizedTest; | 4 | import org.junit.jupiter.params.ParameterizedTest; |
5 | import org.junit.jupiter.params.provider.ValueSource; | 5 | import org.junit.jupiter.params.provider.ValueSource; |
6 | import tools.refinery.store.representation.cardinality.FiniteUpperCardinality; | ||
7 | import tools.refinery.store.representation.cardinality.UnboundedUpperCardinality; | ||
8 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
6 | 9 | ||
7 | import static org.hamcrest.MatcherAssert.assertThat; | 10 | import static org.hamcrest.MatcherAssert.assertThat; |
8 | import static org.hamcrest.Matchers.equalTo; | 11 | import static org.hamcrest.Matchers.equalTo; |
diff --git a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/UpperCardinalityTest.java b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalityTest.java index f5763c2d..e87ce29b 100644 --- a/subprojects/store/src/test/java/tools/refinery/store/model/representation/cardinality/UpperCardinalityTest.java +++ b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalityTest.java | |||
@@ -1,8 +1,10 @@ | |||
1 | package tools.refinery.store.model.representation.cardinality; | 1 | package tools.refinery.store.representation.cardinality; |
2 | 2 | ||
3 | import org.junit.jupiter.params.ParameterizedTest; | 3 | import org.junit.jupiter.params.ParameterizedTest; |
4 | import org.junit.jupiter.params.provider.Arguments; | 4 | import org.junit.jupiter.params.provider.Arguments; |
5 | import org.junit.jupiter.params.provider.MethodSource; | 5 | import org.junit.jupiter.params.provider.MethodSource; |
6 | import tools.refinery.store.representation.cardinality.UpperCardinalities; | ||
7 | import tools.refinery.store.representation.cardinality.UpperCardinality; | ||
6 | 8 | ||
7 | import java.util.stream.Stream; | 9 | import java.util.stream.Stream; |
8 | 10 | ||