Package org.uispec4j.assertion

Examples of org.uispec4j.assertion.Assertion


  /**
   * Checks that the selection is empty.
   */
  public Assertion selectionIsEmpty() {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertEquals(0, jTree.getSelectionCount());
      }
    };
  }
View Full Code Here


  /**
   * Checks the font color used on a given node.
   */
  public Assertion foregroundEquals(final String path, final String color) {
    return new Assertion() {
      public void check() {
        Object userObject = getTreePath(path).getLastPathComponent();
        ColorUtils.assertEquals(color, getShownColor(userObject));
      }
    };
View Full Code Here

   * Checks that the a given node of the jTree is expanded - i.e. that its children are made visible.
   *
   * @param path a String identifying the path to be expanded or collapsed
   */
  public Assertion pathIsExpanded(final String path) {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertTrue(jTree.isExpanded(getTreePath(path)));
      }
    };
  }
View Full Code Here

  /**
   * Checks the list spinner contents
   */
  public Assertion contentEquals(final Object... expectedContents) {
    return new Assertion() {
      public void check() {
        List list = model.getList();
        Utils.assertEquals(expectedContents, list.toArray(new Object[list.size()]));
      }
    };
View Full Code Here

  /**
   * Checks that the list spinner displays starts with the given value
   */
  public Assertion minEquals(final int expectedMin) {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertEquals(new Integer(expectedMin), model.getMinimum());
      }
    };
  }
View Full Code Here

  /**
   * Checks that the list spinner displays starts with the given value
   */
  public Assertion maxEquals(final int expectedMax) {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertEquals(new Integer(expectedMax), model.getMaximum());
      }
    };
  }
View Full Code Here

  /**
   * Checks that the list spinner computes previous and next value with the given value.
   */
  public Assertion stepSizeEquals(final int expectedStepSize) {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertEquals(new Integer(expectedStepSize), model.getStepSize());
      }
    };
  }
View Full Code Here

  public String getDescriptionTypeName() {
    return TYPE_NAME;
  }

  public Assertion isSelected() {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertTrue(jToggleButton.isSelected());
      }
    };
  }
View Full Code Here

   * Checks that the date spinner displays starts with the given value
   *
   * @see DateUtils to format the date as String
   */
  public Assertion startDateEquals(final String expectedStartDate) {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertEquals(extractDate(expectedStartDate), model.getStart());
      }
    };
  }
View Full Code Here

   * Checks that the date spinner displays ends with the given value
   *
   * @see DateUtils to format the date as String
   */
  public Assertion endDateEquals(final String expectedEndDate) {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertEquals(extractDate(expectedEndDate), model.getEnd());
      }
    };
  }
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.