Package org.eclipse.xtext.junit4.validation

Examples of org.eclipse.xtext.junit4.validation.AssertableDiagnostics


  }
 
  @Test
  public void testIUContentAssist6() {
    try {
      ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
      StringConcatenation _builder = new StringConcatenation();
      _builder.append("target \"TPName\"");
      _builder.newLine();
      _builder.append("location \"location4\" {");
      _builder.newLine();
      _builder.append("\t");
      _builder.append("c");
      _builder.newLine();
      _builder.append("}");
      _builder.newLine();
      ContentAssistProcessorTestBuilder _append = _newBuilder.append(_builder.toString());
      ContentAssistProcessorTestBuilder _cursorBack = _append.cursorBack(3);
      _cursorBack.assertText(
        "com.iu1",
        "com.iu2",
        "com.iu3");
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
View Full Code Here


  }
 
  @Test
  public void testIUContentAssist7() {
    try {
      ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
      StringConcatenation _builder = new StringConcatenation();
      _builder.append("target \"TPName\"");
      _builder.newLine();
      _builder.append("location \"emptyLocation\" {");
      _builder.newLine();
      _builder.append("\t");
      _builder.newLine();
      _builder.append("}");
      _builder.newLine();
      ContentAssistProcessorTestBuilder _append = _newBuilder.append(_builder.toString());
      ContentAssistProcessorTestBuilder _cursorBack = _append.cursorBack(3);
      _cursorBack.assertText("");
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here

  }
 
  @Test
  public void testIUContentAssist8() {
    try {
      ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
      StringConcatenation _builder = new StringConcatenation();
      _builder.append("target \"TPName\"");
      _builder.newLine();
      _builder.append("location \"badLocation\" {");
      _builder.newLine();
      _builder.append("\t");
      _builder.newLine();
      _builder.append("}");
      _builder.newLine();
      ContentAssistProcessorTestBuilder _append = _newBuilder.append(_builder.toString());
      ContentAssistProcessorTestBuilder _cursorBack = _append.cursorBack(3);
      _cursorBack.assertText("");
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here

  }
 
  @Test
  public void testIUVersionContentAssist1() {
    try {
      ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
      StringConcatenation _builder = new StringConcatenation();
      _builder.append("target \"TPName\"");
      _builder.newLine();
      _builder.append("location \"location1\" {");
      _builder.newLine();
      _builder.append("\t");
      _builder.append("org.iu1 ");
      _builder.newLine();
      _builder.append("}");
      _builder.newLine();
      ContentAssistProcessorTestBuilder _append = _newBuilder.append(_builder.toString());
      ContentAssistProcessorTestBuilder _cursorBack = _append.cursorBack(3);
      _cursorBack.assertText(
        "[1.2.0,1.2.1)",
        "[1.2.0,1.3.0)",
        "[1.2.0,2.0.0)",
        "[1.2.0,1.2.0]",
        "lazy");
View Full Code Here

  }
 
  @Test
  public void testIUVersionContentAssist2() {
    try {
      ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
      StringConcatenation _builder = new StringConcatenation();
      _builder.append("target \"TPName\"");
      _builder.newLine();
      _builder.append("location \"location3\" {");
      _builder.newLine();
      _builder.append("\t");
      _builder.append("org.iu1 ");
      _builder.newLine();
      _builder.append("}");
      _builder.newLine();
      ContentAssistProcessorTestBuilder _append = _newBuilder.append(_builder.toString());
      ContentAssistProcessorTestBuilder _cursorBack = _append.cursorBack(3);
      _cursorBack.assertText(
        "[1.2.0,1.2.1)",
        "[1.2.0,1.3.0)",
        "[1.2.0,2.0.0)",
        "[1.2.0,1.2.0]",
        "[1.2.5,1.2.6)",
View Full Code Here

      EList<Resource.Diagnostic> _errors = _eResource.getErrors();
      boolean _isEmpty = _errors.isEmpty();
      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      _validator.checkOptionsOnLocationAreIdentical(targetPlatform);
      AssertableDiagnostics _diagnose = tester.diagnose();
      Iterable<Diagnostic> _allDiagnostics = _diagnose.getAllDiagnostics();
      Iterable<AbstractValidationDiagnostic> _filter = Iterables.<AbstractValidationDiagnostic>filter(_allDiagnostics, AbstractValidationDiagnostic.class);
      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(0, _size);
    } catch (Throwable _e) {
View Full Code Here

      EList<Resource.Diagnostic> _errors = _eResource.getErrors();
      boolean _isEmpty = _errors.isEmpty();
      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      _validator.checkOptionsOnLocationAreIdentical(targetPlatform);
      AssertableDiagnostics _diagnose = tester.diagnose();
      Iterable<Diagnostic> _allDiagnostics = _diagnose.getAllDiagnostics();
      Iterable<AbstractValidationDiagnostic> _filter = Iterables.<AbstractValidationDiagnostic>filter(_allDiagnostics, AbstractValidationDiagnostic.class);
      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(2, _size);
      final Function1<AbstractValidationDiagnostic, Boolean> _function = new Function1<AbstractValidationDiagnostic, Boolean>() {
View Full Code Here

      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      EList<Location> _locations = targetPlatform.getLocations();
      Location _head = IterableExtensions.<Location>head(_locations);
      _validator.deprecateOptionsOnLocation(_head);
      AssertableDiagnostics _diagnose = tester.diagnose();
      Iterable<Diagnostic> _allDiagnostics = _diagnose.getAllDiagnostics();
      Iterable<AbstractValidationDiagnostic> _filter = Iterables.<AbstractValidationDiagnostic>filter(_allDiagnostics, AbstractValidationDiagnostic.class);
      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(0, _size);
    } catch (Throwable _e) {
View Full Code Here

      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      EList<Location> _locations = targetPlatform.getLocations();
      Location _head = IterableExtensions.<Location>head(_locations);
      _validator.deprecateOptionsOnLocation(_head);
      AssertableDiagnostics _diagnose = tester.diagnose();
      Iterable<Diagnostic> _allDiagnostics = _diagnose.getAllDiagnostics();
      Iterable<AbstractValidationDiagnostic> _filter = Iterables.<AbstractValidationDiagnostic>filter(_allDiagnostics, AbstractValidationDiagnostic.class);
      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(0, _size);
    } catch (Throwable _e) {
View Full Code Here

      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      EList<Location> _locations = targetPlatform.getLocations();
      Location _head = IterableExtensions.<Location>head(_locations);
      _validator.deprecateOptionsOnLocation(_head);
      AssertableDiagnostics _diagnose = tester.diagnose();
      Iterable<Diagnostic> _allDiagnostics = _diagnose.getAllDiagnostics();
      Iterable<AbstractValidationDiagnostic> _filter = Iterables.<AbstractValidationDiagnostic>filter(_allDiagnostics, AbstractValidationDiagnostic.class);
      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(0, _size);
    } catch (Throwable _e) {
View Full Code Here

TOP

Related Classes of org.eclipse.xtext.junit4.validation.AssertableDiagnostics

Copyright © 2018 www.massapicom. 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.