コード例 #1
0
  @Test
  public void listOfLinksHasProperFormat() {
    String[] linkNames = {"link1", "link2"};
    String listOfLinks = HTMLContent.listOfLinks(linkNames);
    assertTrue(listOfLinks.contains("<ul>") && listOfLinks.contains("</ul>"));

    for (String linkName : linkNames) {
      assertTrue(
          listOfLinks.contains("<li><a href=\"/" + linkName + "\">")
              && listOfLinks.contains("</a></li>"));
    }
  }
コード例 #2
0
 @Before
 public void setUp() {
   openingHTML = HTMLContent.openHTMLAndBody("Some Page Title");
   closingHTML = HTMLContent.closeBodyAndHTML();
 }