protected Element htmlDoc(Node[] headNodes, Node... bodyNodes) { // Clear document of all nodes. while (doc.hasChildNodes()) { doc.removeChild(doc.getFirstChild()); } // Recreate document with valid HTML structure. Element html = elem("html"); Element head = elem("head"); appendAll(head, headNodes); Element body = elem("body"); appendAll(body, bodyNodes); html.appendChild(head); html.appendChild(body); doc.appendChild(html); return html; }
protected Gadget gadget() { return gadget(false, false); }
@Override @Before public void setUp() throws Exception { super.setUp(); // Create a base document with structure: // <root> // <child1>text1</child1> // <child2> // <subchild1>text2</subchild1> // </child2> // </root> // ...which should allow all relevant test cases to be exercised. root = doc.createElement("root"); child1 = doc.createElement("child1"); text1 = doc.createTextNode("text1"); child1.appendChild(text1); root.appendChild(child1); child2 = doc.createElement("child2"); subchild1 = doc.createElement("subchild1"); text2 = doc.createTextNode("text2"); subchild1.appendChild(text2); child2.appendChild(subchild1); root.appendChild(child2); doc.appendChild(root); }
@Override @Before public void setUp() throws Exception { super.setUp(); // Create a base document with structure: // <root> // <child1>text1</child1> // <child2> // <subchild1>text2</subchild1> // </child2> // </root> // ...which should allow all relevant test cases to be exercised. root = doc.createElement("root"); child1 = doc.createElement("child1"); text1 = doc.createTextNode("text1"); child1.appendChild(text1); root.appendChild(child1); child2 = doc.createElement("child2"); subchild1 = doc.createElement("subchild1"); text2 = doc.createTextNode("text2"); subchild1.appendChild(text2); child2.appendChild(subchild1); root.appendChild(child2); doc.appendChild(root); }
@Override @Before public void setUp() { super.setUp(); // Create a base document with structure: // <root> // <child1>text1</child1> // <child2> // <subchild1>text2</subchild1> // </child2> // </root> // ...which should allow all relevant test cases to be exercised. root = doc.createElement("root"); child1 = doc.createElement("child1"); text1 = doc.createTextNode("text1"); child1.appendChild(text1); root.appendChild(child1); child2 = doc.createElement("child2"); subchild1 = doc.createElement("subchild1"); text2 = doc.createTextNode("text2"); subchild1.appendChild(text2); child2.appendChild(subchild1); root.appendChild(child2); doc.appendChild(root); }
protected Element htmlDoc(Node[] headNodes, Node... bodyNodes) { // Clear document of all nodes. while (doc.hasChildNodes()) { doc.removeChild(doc.getFirstChild()); } // Recreate document with valid HTML structure. Element html = elem("html"); Element head = elem("head"); appendAll(head, headNodes); Element body = elem("body"); appendAll(body, bodyNodes); html.appendChild(head); html.appendChild(body); doc.appendChild(html); return html; }
protected Gadget gadget(boolean debug, boolean ignoreCache) { return gadget(debug, ignoreCache, null); }
@Override @Before public void setUp() throws Exception { super.setUp(); proxyUriManager = new PassthruManager(); }
protected Element htmlDoc(Node[] headNodes, Node... bodyNodes) { // Clear document of all nodes. while (doc.hasChildNodes()) { doc.removeChild(doc.getFirstChild()); } // Recreate document with valid HTML structure. Element html = elem("html"); Element head = elem("head"); appendAll(head, headNodes); Element body = elem("body"); appendAll(body, bodyNodes); html.appendChild(head); html.appendChild(body); doc.appendChild(html); return html; }
protected Gadget gadget() { return gadget(false, false); }
@Override public void setUp() throws Exception { super.setUp(); control = EasyMock.createControl(); requestPipeline = control.createMock(RequestPipeline.class); }
protected Gadget gadget(boolean debug, boolean ignoreCache) { return gadget(debug, ignoreCache, null); }
@Before public void setUp() { super.setUp(); proxyUriManager = new PassthruManager(); }
protected Gadget gadget(boolean debug, boolean ignoreCache) { return gadget(debug, ignoreCache, null); }
@Override public void setUp() throws Exception { super.setUp(); control = EasyMock.createControl(); requestPipeline = control.createMock(RequestPipeline.class); }
protected Gadget gadget() { return gadget(false, false); }
@Override @Before public void setUp() throws Exception { super.setUp(); proxyUriManager = new PassthruManager(); }
@Override @Before public void setUp() throws Exception { super.setUp(); ParseModule.DOMImplementationProvider domImpl = new ParseModule.DOMImplementationProvider(); htmlParser = new CajaHtmlParser(domImpl.get()); }
@Before public void setUp() { super.setUp(); ParseModule.DOMImplementationProvider domImpl = new ParseModule.DOMImplementationProvider(); htmlParser = new CajaHtmlParser(domImpl.get()); }
@Override @Before public void setUp() throws Exception { super.setUp(); ParseModule.DOMImplementationProvider domImpl = new ParseModule.DOMImplementationProvider(); htmlParser = new CajaHtmlParser(domImpl.get()); }