Search in sources :

Example 16 with Model

use of org.eclipse.xtext.serializer.contextFinderTest.Model in project xtext-core by eclipse.

the class ContextFinderTest method testQuantityExclusionTest1.

@Test
public void testQuantityExclusionTest1() throws Exception {
    Model model = parseHelper.parse("#5 kw1 bar");
    assertEquals("QuantityExclusionTest1", findContextsByContents(model.getQuantityExclusion()));
}
Also used : Model(org.eclipse.xtext.serializer.contextFinderTest.Model) Test(org.junit.Test)

Example 17 with Model

use of org.eclipse.xtext.serializer.contextFinderTest.Model in project xtext-core by eclipse.

the class ContextFinderTest method testNestedTypeTest1.

@Test
public void testNestedTypeTest1() throws Exception {
    Model model = parseHelper.parse("#2 kw1 bar");
    assertEquals("NestedTypeTest1", findContextsByContents(model.getNestedType()));
}
Also used : Model(org.eclipse.xtext.serializer.contextFinderTest.Model) Test(org.junit.Test)

Example 18 with Model

use of org.eclipse.xtext.serializer.contextFinderTest.Model in project xtext-core by eclipse.

the class ContextFinderTest method testQuantityExclusionTest3.

@Test
public void testQuantityExclusionTest3() throws Exception {
    Model model = parseHelper.parse("#5 kw2 bar baz");
    assertEquals("QuantityExclusionTest1, QuantityExclusionTest2", findContextsByContents(model.getQuantityExclusion()));
}
Also used : Model(org.eclipse.xtext.serializer.contextFinderTest.Model) Test(org.junit.Test)

Example 19 with Model

use of org.eclipse.xtext.serializer.contextFinderTest.Model in project xtext-core by eclipse.

the class ContextFinderTest method testNodeExclusion2.

@Test
public void testNodeExclusion2() throws Exception {
    Model model = parseHelper.parse("#7 'my@' 'my@'");
    proxify(model.getNodeExclusion(), ContextFinderTestPackage.Literals.NODE_EXCLUSION__REF);
    assertEquals("NodeExclusion2", findContextsByContents(model.getNodeExclusion()));
}
Also used : Model(org.eclipse.xtext.serializer.contextFinderTest.Model) Test(org.junit.Test)

Example 20 with Model

use of org.eclipse.xtext.serializer.contextFinderTest.Model in project xtext-core by eclipse.

the class ContextFinderTest method testNestedTypeTest2.

@Test
public void testNestedTypeTest2() throws Exception {
    Model model = parseHelper.parse("#2 kw2 bar");
    assertEquals("NestedTypeTest2", findContextsByContents(model.getNestedType()));
}
Also used : Model(org.eclipse.xtext.serializer.contextFinderTest.Model) Test(org.junit.Test)

Aggregations

Model (org.eclipse.xtext.serializer.contextFinderTest.Model)23 Test (org.junit.Test)20 ParentRefTestChild (org.eclipse.xtext.serializer.contextFinderTest.ParentRefTestChild)5 ParentRefTest1 (org.eclipse.xtext.serializer.contextFinderTest.ParentRefTest1)3 ParentRefTest2 (org.eclipse.xtext.serializer.contextFinderTest.ParentRefTest2)3 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)2 EPackage (org.eclipse.emf.ecore.EPackage)1 Action (org.eclipse.xtext.Action)1 Parameter (org.eclipse.xtext.Parameter)1 ParserRule (org.eclipse.xtext.ParserRule)1 AttributeExclusionTest (org.eclipse.xtext.serializer.contextFinderTest.AttributeExclusionTest)1 NestedTypeChild1 (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeChild1)1 NestedTypeChild2 (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeChild2)1 NestedTypeRecursiveTest (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeRecursiveTest)1 NestedTypeRecursiveTest1 (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeRecursiveTest1)1 NestedTypeRecursiveTest2 (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeRecursiveTest2)1 NestedTypeTest (org.eclipse.xtext.serializer.contextFinderTest.NestedTypeTest)1 NodeExclusion (org.eclipse.xtext.serializer.contextFinderTest.NodeExclusion)1 NodeExclusionList (org.eclipse.xtext.serializer.contextFinderTest.NodeExclusionList)1 QuantityExclusionTest (org.eclipse.xtext.serializer.contextFinderTest.QuantityExclusionTest)1