diff options
author | 2021-10-01 15:52:11 +0200 | |
---|---|---|
committer | 2021-10-01 16:22:14 +0200 | |
commit | eec2d3b70442999a879aa673e52c1144eec4e351 (patch) | |
tree | 0f8aaba92d5baa5b118c93d7198b516ff1986e0d /language-to-store/src/test/java/org/eclipse/viatra/solver/language/mapping/tests/PartialModelMapperTest.xtend | |
parent | build: webpack fixes (diff) | |
download | refinery-eec2d3b70442999a879aa673e52c1144eec4e351.tar.gz refinery-eec2d3b70442999a879aa673e52c1144eec4e351.tar.zst refinery-eec2d3b70442999a879aa673e52c1144eec4e351.zip |
feat: skeleton for language to store mapping
Diffstat (limited to 'language-to-store/src/test/java/org/eclipse/viatra/solver/language/mapping/tests/PartialModelMapperTest.xtend')
-rw-r--r-- | language-to-store/src/test/java/org/eclipse/viatra/solver/language/mapping/tests/PartialModelMapperTest.xtend | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/language-to-store/src/test/java/org/eclipse/viatra/solver/language/mapping/tests/PartialModelMapperTest.xtend b/language-to-store/src/test/java/org/eclipse/viatra/solver/language/mapping/tests/PartialModelMapperTest.xtend new file mode 100644 index 00000000..a769ae20 --- /dev/null +++ b/language-to-store/src/test/java/org/eclipse/viatra/solver/language/mapping/tests/PartialModelMapperTest.xtend | |||
@@ -0,0 +1,44 @@ | |||
1 | package org.eclipse.viatra.solver.language.mapping.tests | ||
2 | |||
3 | import com.google.inject.Inject | ||
4 | import org.eclipse.viatra.solver.language.mapping.PartialModelMapper | ||
5 | import org.eclipse.viatra.solver.language.model.problem.Problem | ||
6 | import org.eclipse.viatra.solver.language.tests.ProblemInjectorProvider | ||
7 | import org.eclipse.xtext.testing.InjectWith | ||
8 | import org.eclipse.xtext.testing.extensions.InjectionExtension | ||
9 | import org.eclipse.xtext.testing.util.ParseHelper | ||
10 | import org.junit.jupiter.api.BeforeEach | ||
11 | import org.junit.jupiter.api.Disabled | ||
12 | import org.junit.jupiter.api.Test | ||
13 | import org.junit.jupiter.api.^extension.ExtendWith | ||
14 | |||
15 | import static org.hamcrest.MatcherAssert.assertThat | ||
16 | import static org.hamcrest.Matchers.* | ||
17 | |||
18 | @ExtendWith(InjectionExtension) | ||
19 | @InjectWith(ProblemInjectorProvider) | ||
20 | class PartialModelMapperTest { | ||
21 | @Inject | ||
22 | ParseHelper<Problem> parseHelper | ||
23 | |||
24 | PartialModelMapper mapper | ||
25 | |||
26 | @BeforeEach | ||
27 | def void beforeEach() { | ||
28 | mapper = new PartialModelMapper | ||
29 | } | ||
30 | |||
31 | @Test | ||
32 | @Disabled("Method not yet implemented") | ||
33 | def void exampleTest() { | ||
34 | val problem = parseHelper.parse(''' | ||
35 | class Person { | ||
36 | Person[0..*] friend | ||
37 | } | ||
38 | |||
39 | friend(a, b). | ||
40 | ''') | ||
41 | val model = mapper.transformProblem(problem) | ||
42 | assertThat(model, notNullValue()) | ||
43 | } | ||
44 | } | ||