|
Re: Grammar and Validation unit_testing [message #1237474 is a reply to message #1236949] |
Wed, 29 January 2014 20:23 |
|
Hi,
i actually cannot reproduce that.
maybe it has todo with your changes regarding absolute paths.
here is my test that works fine
@RunWith(XtextRunner2.class)
@InjectWith(MyDslInjectorProvider.class)
public class CalculationGrammarTest extends XtextTest {
private static final String warningFile = "test.mydsl8";
private static final String noWarningFile = "test2.mydsl8";
private static final String path = "model";
public CalculationGrammarTest() {
super(path);
}
@Test
public void warningCalculationTest() {
testFile(warningFile);
assertConstraints(
issues.warningsOnly()
.inLine(1)
.oneOfThemContains("Name should start")
);
}
@Test
public void warningCalculationTest2() {
testFile(warningFile);
assertConstraints(
issues.warningsOnly()
.inLine(1)
.oneOfThemContains("Name should start")
);
}
@Test
public void warningCalculationTest3() {
testFile(noWarningFile);
}
}
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
Powered by
FUDForum. Page generated in 0.03810 seconds