Beispiel #1
0
  @Test
  public void unavailableMenuTest() {
    log.info("unavailable regex menu test");
    try {
      RegexMatcher[] regexMatchers = {new RegexMatcher("Win.*"), new RegexMatcher("Prefz.*")};
      WithTextMatchers m = new WithTextMatchers(regexMatchers);
      new ShellMenu(m.getMatchers());
      fail("exception should be thrown");
    } catch (SWTLayerException e) { // do nothing

    }
  }
Beispiel #2
0
  @Test
  public void regexMenuTest() {

    log.info("regex menu test");
    try {
      RegexMatcher[] regexMatchers = {new RegexMatcher("Win.*"), new RegexMatcher("Pref.*")};
      WithTextMatchers m = new WithTextMatchers(regexMatchers);
      new ShellMenu(m.getMatchers());
    } catch (SWTLayerException e) {
      fail("there should be no exception");
    }
  }