1 package org.apidesign.bck2brwsr.htmlpage;
3 import java.io.IOException;
4 import java.io.InputStream;
6 import org.testng.annotations.Test;
7 import static org.testng.Assert.*;
9 public class ProcessPageTest {
12 @Test public void findsThreeIds() throws IOException {
13 InputStream is = ProcessPageTest.class.getResourceAsStream("TestPage.xhtml");
14 assertNotNull(is, "Sample HTML page found");
15 ProcessPage res = ProcessPage.readPage(is);
16 final Set<String> ids = res.ids();
17 assertEquals(ids.size(), 3, "Three ids found: " + ids);
19 assertEquals(res.tagNameForId("pg.title"), "title");
20 assertEquals(res.tagNameForId("pg.button"), "button");
21 assertEquals(res.tagNameForId("pg.text"), "input");