Examples of assertCorrectLogEntries()


Examples of com.google.gwt.dev.util.UnitTestTreeLogger.assertCorrectLogEntries()

      b.expect(message.logLevel, fullMessage, null);
    }
    UnitTestTreeLogger logger = b.createLogger();
    TypeOracle oracle = buildOracle(logger, buggyCode, extraCode);

    logger.assertCorrectLogEntries();
    String className = buggyCode.getTypeName();
    if (messages.length != 0 && logLevel == TreeLogger.ERROR) {
      assertNull("Buggy compilation unit not removed from type oracle",
          oracle.findType(className));
    } else {
View Full Code Here

Examples of com.google.gwt.dev.util.UnitTestTreeLogger.assertCorrectLogEntries()

    loggerBuilder.expectError("Errors in '/mock/bad3.java'", null);
    loggerBuilder.expectError("bad1 cannot be resolved to a type", null);
    UnitTestTreeLogger testLogger = loggerBuilder.createLogger();
    CompilationProblemReporter.logErrorTrace(testLogger, TreeLogger.ERROR, compilerContext, "bad6",
        false);
    testLogger.assertCorrectLogEntries();

    // Check that validClasses is not mutated
    assertEquals(knownValidClasses, validClasses);

    // Check that units is mutated
View Full Code Here

Examples of com.google.gwt.dev.util.UnitTestTreeLogger.assertCorrectLogEntries()

      new RequestFactoryModel(testLogger, state.getTypeOracle().findType(
          "t.TestRequestFactory"));
      fail("Should have complained");
    } catch (UnableToCompleteException e) {
    }
    testLogger.assertCorrectLogEntries();
  }

  private Set<Resource> getJavaResources(final String proxyClass) {
    MockJavaResource[] javaFiles = {new MockJavaResource("t.AddressProxy") {
      @Override
View Full Code Here

Examples of com.google.gwt.dev.util.UnitTestTreeLogger.assertCorrectLogEntries()

    CssResourceGenerator crg = new CssResourceGenerator();
    // Test the method
    crg.outputCssMapArtifact(testLogger, mockResourceContext, method, testMap);

    testLogger.assertCorrectLogEntries();

    verify(mockGeneratorContext).tryCreateResource(testLogger, "cssResource/com.test.Bundle.cssMethod.cssmap");
    verify(mockGeneratorContext).commitResource(testLogger, mockOutputStream);
    verifyNoMoreInteractions(mockGeneratorContext);
  }
View Full Code Here

Examples of com.google.gwt.dev.util.UnitTestTreeLogger.assertCorrectLogEntries()

    when(method.getName()).thenReturn("cssMethod");

    CssResourceGenerator crg = new CssResourceGenerator();
    crg.outputCssMapArtifact(testLogger, mockResourceContext, method, testMap);

    testLogger.assertCorrectLogEntries();

    verify(mockGeneratorContext).tryCreateResource(testLogger, "cssResource/com.test.Bundle.cssMethod.cssmap");
    verifyNoMoreInteractions(mockGeneratorContext);
  }
View Full Code Here

Examples of com.google.gwt.dev.util.UnitTestTreeLogger.assertCorrectLogEntries()

    when(method.getName()).thenReturn("cssMethod");

    CssResourceGenerator crg = new CssResourceGenerator();
    crg.outputCssMapArtifact(testLogger, mockResourceContext, method, testMap);

    testLogger.assertCorrectLogEntries();

    verify(mockGeneratorContext).tryCreateResource(testLogger,
        "cssResource/com.test.Bundle.cssMethod.cssmap");
    verifyNoMoreInteractions(mockGeneratorContext);
  }
View Full Code Here

Examples of com.google.gwt.dev.util.UnitTestTreeLogger.assertCorrectLogEntries()

    when(method.getName()).thenReturn("cssMethod");

    CssResourceGenerator crg = new CssResourceGenerator();
    crg.outputCssMapArtifact(testLogger, mockResourceContext, method, testMap);

    testLogger.assertCorrectLogEntries();

    verify(mockGeneratorContext).tryCreateResource(testLogger, "cssResource/com.test.Bundle.cssMethod.cssmap");
    verify(mockGeneratorContext).commitResource(testLogger, mockOutputStream);
  }
View Full Code Here

Examples of com.google.gwt.dev.util.UnitTestTreeLogger.assertCorrectLogEntries()

    String expectedOutput = "test-class-type-1-basename1,TESTCSSNAME1\n" +
        "test-class-type-2-basename2,TESTCSSNAME2\n" +
        "test-class-type-3-basename3,TESTCSSNAME3\n";
    assertEquals(expectedOutput, testOutputStream.toString());

    testLogger.assertCorrectLogEntries();

    verify(mockGeneratorContext).tryCreateResource(testLogger, "cssResource/com.test.Bundle.cssMethod.cssmap");
    verify(mockGeneratorContext).commitResource(testLogger, testOutputStream);
  }
}
View Full Code Here

Examples of com.google.gwt.dev.util.UnitTestTreeLogger.assertCorrectLogEntries()

      getImageName(logger, new String[0], "nonexistentImg", "from.metadata",
          getResourceAnnotation("testResourceNotFoundGivenAnnotation"));
      fail("Should have thrown");
    } catch (UnableToCompleteException e) {
    }
    logger.assertCorrectLogEntries();
  }

  /**
   * Tests that a message is logged and an exception is thrown when a resource
   * isn't found after being sought based on the method name.
View Full Code Here

Examples of com.google.gwt.dev.util.UnitTestTreeLogger.assertCorrectLogEntries()

    try {
      getImageName(logger, new String[0], "nonexistentImg", "test", null);
      fail("Should have thrown");
    } catch (UnableToCompleteException e) {
    }
    logger.assertCorrectLogEntries();
  }

  /**
   * Tests that resources can be found in a variety of ways from an image bundle
   * residing in the default package.
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.