org.eclipse.xtext.junit4.validation.ValidatorTester Java Examples

The following examples show how to use org.eclipse.xtext.junit4.validation.ValidatorTester. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractSTextValidationTest.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
@Before public void setup() {
	factory = SGraphFactory.eINSTANCE;

	resource = new StextResource(URI.createURI(""));
	injector.injectMembers(resource);
	statechart = factory.createStatechart();
	resource.getContents().add(statechart);

	diagnostics = new BasicDiagnostic();
	tester = new ValidatorTester<STextValidator>(validator, injector);
}
 
Example #2
Source File: FjAbstractGeneratedValidatorTests.java    From xsemantics with Eclipse Public License 1.0 5 votes vote down vote up
@Override
@Before
public void setUp() throws Exception {
	super.setUp();
	with(fjCustomStandaloneSetupClass());
	tester = new ValidatorTester<AbstractDeclarativeValidator>(
			get(AbstractDeclarativeValidator.class), getInjector());
	expectedTraces = get(FjExpectedTraces.class);
}
 
Example #3
Source File: XsemanticsValidatorTests.java    From xsemantics with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void setUp() throws Exception {
	super.setUp();
	validator = get(XsemanticsValidator.class);
	validator.setEnableWarnings(false);
	tester = new ValidatorTester<XsemanticsValidator>(validator,
			getInjector());
	validationTestHelper = get(ValidationTestHelper.class);
}
 
Example #4
Source File: TestModelsContainErrorsTest.java    From statecharts with Eclipse Public License 1.0 4 votes vote down vote up
@Before
public void setup() {
	tester = new ValidatorTester<STextValidator>(validator, injector);
}
 
Example #5
Source File: AbstractSGenTest.java    From statecharts with Eclipse Public License 1.0 4 votes vote down vote up
@Before
public void setup() {
	tester = new ValidatorTester<>(validator, injector);
}
 
Example #6
Source File: AbstractValidValidationTest.java    From dsl-devkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Returns the validation tester generated for this test.
 *
 * @return the validation tester generated for this test
 */
protected abstract ValidatorTester<?> getTester();