Ejemplo n.º 1
0
  @Test
  public void cssResourceEnsureInjected() {
    // Arrange
    TestCssResource testCssResource = MyClientBundle.INSTANCE.testCssResource();

    // Act & Assert
    assertTrue(testCssResource.ensureInjected());
    assertFalse(testCssResource.ensureInjected());
  }
Ejemplo n.º 2
0
  @Test
  public void cssResource() {
    // Arrange
    TestCssResource testCssResource = MyClientBundle.INSTANCE.testCssResource();

    // Act
    String name = testCssResource.getName();
    String testStyle = testCssResource.testStyle();
    String testStyleWithHover = testCssResource.testStyleWithHover();
    String testStyleOnSpecificElement = testCssResource.testStyleOnSpecificElement();
    String testStyleOnSpecificStyle = testCssResource.testStyleOnSpecificStyle();
    String constantValue = testCssResource.testConstant();
    String toString = testCssResource.toString();

    // Assert
    assertEquals("testCssResource", name);
    assertEquals("testStyle", testStyle);
    assertEquals("testStyleWithHover", testStyleWithHover);
    assertEquals("testStyleOnSpecificElement", testStyleOnSpecificElement);
    assertEquals("testStyleOnSpecificStyle", testStyleOnSpecificStyle);
    assertEquals("constant-value", constantValue);
    assertEquals(
        "com.octo.gwt.test.internal.resources.CssResourceCallback generated for 'com.octo.gwt.test.resources.MyClientBundle.testCssResource()'",
        toString);
    assertEquals(testCssResource, MyClientBundle.INSTANCE.testCssResource());
  }