コード例 #1
0
 /** Setup test fixtures. */
 @Before
 public final void setUp() {
   sut = new HtmlLinkParser();
   sut.setDescriptionParser(descriptionParser);
   sut.setImageParser(imageParser);
   sut.setTitleParser(titleParser);
 }
コード例 #2
0
  /** Parse information test. */
  @Test
  public final void parseInformationTest() {
    final LinkInformation link = new LinkInformation();
    final String html = "<html></html>";

    context.checking(
        new Expectations() {
          {
            oneOf(descriptionParser).parseInformation(html, link, TEST_ACCOUNT);
            oneOf(imageParser).parseInformation(html, link, TEST_ACCOUNT);
            oneOf(titleParser).parseInformation(html, link, TEST_ACCOUNT);
          }
        });

    sut.parseLinkInformation(html, link, TEST_ACCOUNT);

    context.assertIsSatisfied();
  }