@Test
  public void createFrames_ReturnsNineFramesAndOneTenthFrame() {
    EventAggregator aggregator = mock(EventAggregator.class);

    FrameFactory factory = new StandardFrameFactory(aggregator);
    List<Frame> frames = factory.createFrames(new Player("Adam"));

    assertThat(frames.size(), is(10));
    assertTrue(frames.get(9) instanceof TenthFrame);
  }
Ejemplo n.º 2
0
  <T extends FramedElement> T frameElement(Element e, Class<T> kind) {

    Class<T> frameType =
        (kind == TVertex.class || kind == TEdge.class) ? kind : resolver.resolve(e, kind);

    T framedElement = builder.create(e, frameType);
    framedElement.init(this, e);
    return framedElement;
  }