Package org.uispec4j.assertion

Examples of org.uispec4j.assertion.Assertion


      }
    };
  }

  public Assertion textEquals(final String text) {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertEquals(text, jLabel.getText());
      }
    };
  }
View Full Code Here


      }
    };
  }

  public Assertion htmlEquals(String html) {
    return new Assertion() {
      public void check() {
        AssertAdapter.fail("This component does not support html.");
      }
    };
  }
View Full Code Here

      }
    };
  }

  public Assertion textContains(final String text) {
    return new Assertion() {
      public void check() {
        String actualText = jLabel.getText();
        AssertAdapter.assertTrue("The component text does not contain '" + text +
                                  "' - actual content is: " + actualText,
                                  actualText.indexOf(text) >= 0);
View Full Code Here

      }
    };
  }

  public Assertion textDoesNotContain(final String text) {
    return new Assertion() {
      public void check() {
        String actualText = jLabel.getText();
        AssertAdapter.assertTrue("The component text should not contain '" + text +
                                  "' - actual content is: " + actualText,
                                  actualText.indexOf(text) < 0);
View Full Code Here

      }
    };
  }

  public Assertion isEditable() {
    return new Assertion() {
      public void check() {
        AssertAdapter.fail("Text is not editable");
      }
    };
  }
View Full Code Here

  public void clickOnHyperlink(String link) {
    AssertAdapter.fail("This component does not support hyperlinks.");
  }

  public Assertion iconEquals(final Icon icon) {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertEquals("Unexpected icon", icon, jLabel.getIcon());
      }
    };
  }
View Full Code Here

  private TextBoxHandlerForHtmlTextComponent(JTextComponent textComponent) {
    super(textComponent);
  }

  public Assertion textIsEmpty() {
    return new Assertion() {
      public void check() {
        String actualText = jTextComponent.getText();
        JTextPane dummyPane = createHtmlTextPane();
        if (isEquivalent(dummyPane, actualText)) {
          return;
View Full Code Here

      throw new RuntimeException(e);
    }
  }

  public Assertion textEquals(final String text) {
    return new Assertion() {
      public void check() {
        String actual = Utils.cleanupHtml(jTextComponent.getText());
        AssertAdapter.assertEquals(text, actual);
      }
    };
View Full Code Here

      }
    };
  }

  public Assertion htmlEquals(final String html) {
    return new Assertion() {
      public void check() {
        if (html.equals("")) {
          textIsEmpty();
          return;
        }
View Full Code Here

    model.setPressed(false);
    model.setArmed(false);
  }

  public Assertion textEquals(final String text) {
    return new Assertion() {
      public void check() {
        String label = abstractButton.getText();
        if (label != null) {
          label = label.trim();
        }
View Full Code Here

TOP

Related Classes of org.uispec4j.assertion.Assertion

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.