Package com.crawljax.plugins.crawloverview.model

Examples of com.crawljax.plugins.crawloverview.model.State


    return enough;
  }

  @Test
  public void verifyIndexHoversCorrect() {
    State state = result.getStates().get("index");
    assertThat(state, is(notNullValue()));
    List<CandidateElementPosition> candidates = state.getCandidateElements();
    assertThat("Number of hovers", candidates, hasSize(3));
    Assume.assumeTrue(resolutionBigEnough);
    assertThat(candidates, hasItem(element(new Point(48, 118), new Dimension(52, 16))));
    assertThat(candidates, hasItem(element(new Point(48, 137), new Dimension(51, 16))));
    assertThat(candidates, hasItem(element(new Point(48, 156), new Dimension(200, 16))));
View Full Code Here


    assertThat(candidates, hasItem(element(new Point(48, 156), new Dimension(200, 16))));
  }

  @Test
  public void verifyPageAHoversCorrect() {
    State state = getStateByFileName("a.html");
    assertThat(state, is(notNullValue()));
    List<CandidateElementPosition> candidates = state.getCandidateElements();
    assertThat(candidates, hasSize(1));
    Assume.assumeTrue(resolutionBigEnough);
    assertThat(candidates, hasItem(element(new Point(58, 147), new Dimension(89, 16))));
  }
View Full Code Here

    assertThat(candidates, hasItem(element(new Point(58, 147), new Dimension(89, 16))));
  }

  @Test
  public void verifyPageBHoversCorrect() {
    State state = getStateByFileName("b.html");
    assertThat(state, is(notNullValue()));
    List<CandidateElementPosition> candidates = state.getCandidateElements();
    assertThat(candidates, hasSize(1));
    Assume.assumeTrue(resolutionBigEnough);
    assertThat(candidates, hasItem(element(new Point(60, 168), new Dimension(51, 16))));
  }
View Full Code Here

    assertThat(candidates, hasItem(element(new Point(60, 168), new Dimension(51, 16))));
  }

  @Test
  public void verifyPageCHoversCorrect() {
    State state = getStateByFileName("c.html");
    assertThat(state, is(notNullValue()));
    List<CandidateElementPosition> candidates = state.getCandidateElements();
    assertThat(candidates, hasSize(2));
    // The dimensions can't be checked because they are dynamic.
  }
View Full Code Here

  public int incrementFanIn() {
    return fanIn.incrementAndGet();
  }

  public State build() {
    return new State(state, fanIn.get(), fanOut.get(), getCandidates(),
            failedEvents.build());
  }
View Full Code Here

  public int incrementFanIn() {
    return fanIn.incrementAndGet();
  }

  public State build() {
    return new State(state, fanIn.get(), fanOut.get(), getCandidates(),
            screenShotOffset, failedEvents.build());
  }
View Full Code Here

TOP

Related Classes of com.crawljax.plugins.crawloverview.model.State

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.