| /* |
| * generated by Xtext 2.10.0-SNAPSHOT |
| */ |
| package org.eclipse.emf.parsley.dsl.tests |
| |
| import com.google.inject.Inject |
| import org.eclipse.emf.parsley.dsl.model.ModelPackage |
| import org.eclipse.xtext.diagnostics.Diagnostic |
| import org.eclipse.xtext.junit4.InjectWith |
| import org.eclipse.xtext.junit4.XtextRunner |
| import org.eclipse.xtext.junit4.validation.ValidationTestHelper |
| import org.junit.Test |
| import org.junit.runner.RunWith |
| |
| @RunWith(XtextRunner) |
| @InjectWith(EmfParsleyDslInjectorProvider) |
| class EmfParsleyDslParsingTest extends EmfParsleyDslAbstractTests { |
| |
| @Inject extension ValidationTestHelper |
| |
| @Test |
| def void testEmptyModule() { |
| inputs.emptyModule.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testModuleWithExtends() { |
| inputs.moduleWithExtends.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testEmptyLabelProvider() { |
| inputs.emptyLabelProvider.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testEmptyLabelSpecifications() { |
| inputs.emptyLabelSpecifications.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testLabelSpecifications() { |
| inputs.labelProvider.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testEmptyLabelSpecificationsForColumns() { |
| inputs.emptyLabelSpecificationsForColumns.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testLabelSpecificationsForColumns() { |
| inputs.tableLabelProvider.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testDuplicateLabelSpecifications() { |
| inputsWithErrors.duplicateLabelSpecifications.parseAndAssertErrors |
| } |
| |
| @Test |
| def void testPropertyDescriptionSpecifications() { |
| inputs.featureCaptionProvider.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testFormPropertyDescriptionSpecifications() { |
| inputs.formFeatureCaptionProvider.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testDialogPropertyDescriptionSpecifications() { |
| inputs.dialogFeatureCaptionProvider.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testWrongFeatureLabelSpecifications() { |
| val model = inputsWithErrors.wrongPropertyDescriptionSpecifications.parseModel |
| model.assertError( |
| ModelPackage::eINSTANCE.featureAssociatedExpression, |
| Diagnostic::LINKING_DIAGNOSTIC, |
| "newArrayList" |
| ) |
| model.assertError( |
| ModelPackage::eINSTANCE.featureAssociatedExpression, |
| Diagnostic::LINKING_DIAGNOSTIC, |
| "getBooks" |
| ) |
| } |
| |
| @Test |
| def void testFeaturesSpecifications() { |
| inputs.featuresProvider.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testFormControlFactory() { |
| inputs.formControlFactory.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testDialogControlFactory() { |
| inputs.dialogControlFactory.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testProposalsSpecifications() { |
| inputs.proposalCreator.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testViewerContentProviderSpecifications() { |
| inputs.viewerContentProvider.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testEmptyViewsSpecifications() { |
| inputs.emptyViewsSpecifications.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testNonEmptyViewsSpecifications() { |
| inputs.nonEmptyViewsSpecifications.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testMultipleViewsSpecifications() { |
| inputs.multipleViewsSpecifications.parseAndAssertNoError |
| } |
| |
| @Test |
| def void testConfigurator() { |
| inputs.configuratorExample.parseAndAssertNoError |
| } |
| |
| } |