Package org.eclipse.xtext.junit4.validation

Examples of org.eclipse.xtext.junit4.validation.AssertableDiagnostics.assertAll()


    code = "$a = 'abc' ? {\n" + //
        "'abc' =>" + "$1\n" + //
        "}\n"; //
    r = getResourceFromString(code);
    AssertableDiagnostics asserter = tester.validate(r.getContents().get(0));
    asserter.assertAll(AssertableDiagnostics.warningCode(IPPDiagnostics.ISSUE__MISSING_DEFAULT));
    resourceWarningDiagnostics(r).assertAll(
      AssertableResourceDiagnostics.diagnostic(IPPDiagnostics.ISSUE__UNKNOWN_REGEXP));
    resourceErrorDiagnostics(r).assertOK();
  }
View Full Code Here


    code = "$a = 'abc' ? {\n" + //
        "/a(b)c/ =>" + "$1\n" + //
        "}\n"; //
    r = getResourceFromString(code);
    AssertableDiagnostics asserter = tester.validate(r.getContents().get(0));
    asserter.assertAll(AssertableDiagnostics.warningCode(IPPDiagnostics.ISSUE__MISSING_DEFAULT));
    resourceWarningDiagnostics(r).assertOK();
    resourceErrorDiagnostics(r).assertOK();
  }

  @Test
View Full Code Here

    code = "$a = 'abc' ? {\n" + //
        "'abc' =>" + "\"${1}\"\n" + //
        "}\n"; //
    r = getResourceFromString(code);
    AssertableDiagnostics asserter = tester.validate(r.getContents().get(0));
    asserter.assertAll(AssertableDiagnostics.warningCode(IPPDiagnostics.ISSUE__MISSING_DEFAULT));
    resourceWarningDiagnostics(r).assertDiagnostic(IPPDiagnostics.ISSUE__UNKNOWN_REGEXP);
    resourceErrorDiagnostics(r).assertOK();
  }

  @Test
View Full Code Here

    code = "$a = 'abc' ? {\n" + //
        "/a(b)c/ =>" + "\"${1}\"\n" + //
        "}\n"; //
    r = getResourceFromString(code);
    AssertableDiagnostics asserter = tester.validate(r.getContents().get(0));
    asserter.assertAll(AssertableDiagnostics.warningCode(IPPDiagnostics.ISSUE__MISSING_DEFAULT));
    resourceWarningDiagnostics(r).assertOK();
    resourceErrorDiagnostics(r).assertOK();
  }

  @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.