public void testResolveWhenCharacterHasCodewordShouldReturnHave() { // GIVEN expect(parent.getId()).andReturn("ship"); expect(parent.getHave()).andReturn(have); mockControl.replay(); // WHEN final ParagraphData returned = underTest.resolve(parent, resolvationData); // THEN Assert.assertSame(returned, have); }
@Override public ParagraphData resolve( final ItemCheckCommand parent, final ResolvationData resolvationData) { ParagraphData toResolve; if (resolvationData .getCharacterHandler() .getParagraphHandler() .visitedParagraph(resolvationData.getCharacter(), parent.getId())) { toResolve = parent.getHave(); } else { toResolve = parent.getDontHave(); } return toResolve; }