@Test public void testSetAttributeNS() { Element node = mock(Element.class); String namespaceURI = "uri1"; String qualifiedName = "fqn1"; String value = "nodeValue1"; Attr attr = mock(Attr.class); when(node.getAttributeNode(eq(qualifiedName))).thenReturn(attr); Attr result = tested.setAttributeNS(node, namespaceURI, qualifiedName, value); assertEquals(attr, result); verify(node, times(1)).setAttribute(eq(qualifiedName), eq(value)); }
public Attr setAttributeNS(final Node node, final String namespaceURI, final String qualifiedName, final String value) { final Element e = (Element) node; e.setAttribute(qualifiedName, value); return e.getAttributeNode(qualifiedName); }
GwtDOMHandler { public Attr setAttributeNS(final Node node, final String namespaceURI, final String qualifiedName, final String value) { final Element e = (Element) node; e.setAttribute(qualifiedName, value); return e.getAttributeNode(qualifiedName); } }
GwtDOMHandler { public Attr setAttributeNS(final Node node, final String namespaceURI, final String qualifiedName, final String value) { final Element e = (Element) node; e.setAttribute(qualifiedName, value); return e.getAttributeNode(qualifiedName); } GwtDOMHandler(final Document document); }
GwtDOMHandler { public Attr setAttributeNS(final Node node, final String namespaceURI, final String qualifiedName, final String value) { final Element e = (Element) node; e.setAttribute(qualifiedName, value); return e.getAttributeNode(qualifiedName); } GwtDOMHandler(final Document document); Element createElement(final String tagName); Text createTextNode(final String data); Comment createComment(final String data); CDATASection createCDATASection(final String data); ProcessingInstruction createProcessingInstruction(final String target,
                                                             final String data); Element createElementNS(final String namespaceURI,
                                   final String qualifiedName); Attr createAttributeNS(final String namespaceURI,
                                  final String qualifiedName); Attr setAttributeNS(final Node node,
                               final String namespaceURI,
                               final String qualifiedName,
                               final String value); Attr setAttributeNodeNS(final Node element,
                                   final Attr attr); static Node getNamedItem(NamedNodeMap map,
                                    String uri,
                                    String localName); Document getDocument(); }
GwtDOMHandler { public Attr setAttributeNS(final Node node, final String namespaceURI, final String qualifiedName, final String value) { final Element e = (Element) node; e.setAttribute(qualifiedName, value); return e.getAttributeNode(qualifiedName); } GwtDOMHandler(final Document document); Element createElement(final String tagName); Text createTextNode(final String data); Comment createComment(final String data); CDATASection createCDATASection(final String data); ProcessingInstruction createProcessingInstruction(final String target,
                                                             final String data); Element createElementNS(final String namespaceURI,
                                   final String qualifiedName); Attr createAttributeNS(final String namespaceURI,
                                  final String qualifiedName); Attr setAttributeNS(final Node node,
                               final String namespaceURI,
                               final String qualifiedName,
                               final String value); Attr setAttributeNodeNS(final Node element,
                                   final Attr attr); static Node getNamedItem(NamedNodeMap map,
                                    String uri,
                                    String localName); Document getDocument();  }