@Test public void containsLinks() throws Exception { Element inc = document.findLinkByLabel("inc"); assertEquals("Inc has bad url", "?value=256", inc.getAttribute("href")); Element dec = document.findLinkByLabel("dec"); assertEquals("Dec has bad url", "?value=254", dec.getAttribute("href")); }
@Test public void defaultValueIsZero() throws Exception { document = new Counter(null).toHtmlDocument(); assertEquals("0x0", document.findElementById("display").contentsAsText()); }
@Test public void containsDisplay() throws Exception { Element display = document.findElementById("display"); assertEquals("Display shows wrong value", "0xff", display.contentsAsText()); }