Package org.uispec4j.assertion

Examples of org.uispec4j.assertion.Assertion


   * Checks the background color of the List cells using either Color or String objects
   *
   * @see <a href="http://www.uispec4j.org/usingcolors.html">Using colors</a>
   */
  public Assertion backgroundEquals(final Object[] colors) {
    return new Assertion() {
      public void check() {
        checkColors(colors, ComponentColorChecker.BACKGROUND);
      }
    };
  }
View Full Code Here


  protected void addAttributes(Component component, XmlWriter.Tag tag) {
    tag.addAttribute("title", adapter.getTitle());
  }

  public Assertion containsMenuBar() {
    return new Assertion() {
      public void check() {
        if (adapter.getJMenuBar() == null) {
          AssertAdapter.fail("No menuBar available");
        }
      }
View Full Code Here

  public String getTitle() {
    return adapter.getTitle();
  }

  public Assertion titleEquals(final String expected) {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertEquals("Unexpected title -", expected, getTitle());
      }
    };
  }
View Full Code Here

      }
    };
  }

  public Assertion titleContains(final String expected) {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertTrue("expected to contain:<" + expected + "> but was:<" + getTitle() + ">",
                                  getTitle().contains(expected));
      }
    };
View Full Code Here

  public Container getInternalAwtContainer() {
    return adapter.getInternalAwtContainer();
  }

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

  public String getDescriptionTypeName() {
    return TYPE_NAME;
  }

  public Assertion passwordEquals(final String hiddenPassword) {
    return new Assertion() {
      public void check() {
        AssertAdapter.assertEquals(hiddenPassword, new String(jPasswordField.getPassword()));
      }
    };
  }
View Full Code Here

    Component[] swingComponents = finder.getComponents(name, swingClasses);
    return UIComponentFactory.createUIComponents(swingComponents);
  }

  public <T extends UIComponent> Assertion containsUIComponent(final Class<T> uicomponentClass) {
    return new Assertion() {
      public void check() {
        UIComponent[] uiComponents = getUIComponents(uicomponentClass);
        AssertAdapter.assertTrue(uiComponents.length > 0);
      }
    };
View Full Code Here

      }
    };
  }

  public <T extends Component> Assertion containsSwingComponent(final Class<T> swingComponentClass) {
    return new Assertion() {
      public void check() {
        Component[] swingComponents = getSwingComponents(swingComponentClass);
        AssertAdapter.assertTrue(swingComponents.length > 0);
      }
    };
View Full Code Here

      }
    };
  }

  public <T extends UIComponent> Assertion containsUIComponent(final Class<T> uiComponentClass, final String name) {
    return new Assertion() {
      public void check() {
        UIComponent[] uiComponents = getUIComponents(uiComponentClass, name);
        AssertAdapter.assertTrue(uiComponents.length > 0);
      }
    };
View Full Code Here

      }
    };
  }

  public <T extends Component> Assertion containsSwingComponent(final Class<T> swingComponentClass, final String name) {
    return new Assertion() {
      public void check() {
        Component[] swingComponents = getSwingComponents(swingComponentClass, name);
        AssertAdapter.assertTrue(swingComponents.length > 0);
      }
    };
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.