Search in sources :

Example 1 with UnassignedRuleCall2

use of org.eclipse.xtext.validation.csvalidationtest.UnassignedRuleCall2 in project xtext-core by eclipse.

the class ConcreteSyntaxValidationTest method testUnassignedRuleCall2.

@Test
public void testUnassignedRuleCall2() throws Exception {
    UnassignedRuleCall2SubAction a = f.createUnassignedRuleCall2SubAction();
    a.setVal2("foo");
    validate(a).assertOK();
    UnassignedRuleCall2Sub s = f.createUnassignedRuleCall2Sub();
    s.setVal2("foo");
    validate(s).assertAll(errorCode(ERROR_WRONG_TYPE));
    UnassignedRuleCall2 c = f.createUnassignedRuleCall2();
    validate(c).assertAll(errorCode(ERROR_WRONG_TYPE));
}
Also used : UnassignedRuleCall2(org.eclipse.xtext.validation.csvalidationtest.UnassignedRuleCall2) UnassignedRuleCall2SubAction(org.eclipse.xtext.validation.csvalidationtest.UnassignedRuleCall2SubAction) UnassignedRuleCall2Sub(org.eclipse.xtext.validation.csvalidationtest.UnassignedRuleCall2Sub) Test(org.junit.Test)

Example 2 with UnassignedRuleCall2

use of org.eclipse.xtext.validation.csvalidationtest.UnassignedRuleCall2 in project xtext-core by eclipse.

the class ModelImpl method basicSetX12.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetX12(UnassignedRuleCall2 newX12, NotificationChain msgs) {
    UnassignedRuleCall2 oldX12 = x12;
    x12 = newX12;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CsvalidationtestPackage.MODEL__X12, oldX12, newX12);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : UnassignedRuleCall2(org.eclipse.xtext.validation.csvalidationtest.UnassignedRuleCall2) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

UnassignedRuleCall2 (org.eclipse.xtext.validation.csvalidationtest.UnassignedRuleCall2)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 UnassignedRuleCall2Sub (org.eclipse.xtext.validation.csvalidationtest.UnassignedRuleCall2Sub)1 UnassignedRuleCall2SubAction (org.eclipse.xtext.validation.csvalidationtest.UnassignedRuleCall2SubAction)1 Test (org.junit.Test)1