ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1697212 - /webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateAttribute.java
Date Sun, 23 Aug 2015 16:18:34 GMT
Author: veithen
Date: Sun Aug 23 16:18:33 2015
New Revision: 1697212

URL: http://svn.apache.org/r1697212
Log:
Add some more assertions to the unit test for Document#createAttribute.

Modified:
    webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateAttribute.java

Modified: webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateAttribute.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateAttribute.java?rev=1697212&r1=1697211&r2=1697212&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateAttribute.java
(original)
+++ webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateAttribute.java
Sun Aug 23 16:18:33 2015
@@ -18,6 +18,8 @@
  */
 package org.apache.axiom.ts.dom.document;
 
+import static com.google.common.truth.Truth.assertThat;
+
 import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.apache.axiom.ts.dom.DOMTestCase;
@@ -31,11 +33,12 @@ public class TestCreateAttribute extends
 
     protected void runTest() throws Throwable {
         String attrName = "attrIdentifier";
-
         Document doc = dbf.newDocumentBuilder().newDocument();
         Attr attr = doc.createAttribute(attrName);
-
-        assertEquals("Attr name mismatch", attrName, attr.getName());
-        assertNull("Namespace value should be null", attr.getNamespaceURI());
+        assertThat(attr.getNodeName()).isEqualTo(attrName);
+        assertThat(attr.getName()).isEqualTo(attrName);
+        assertThat(attr.getPrefix()).isNull();
+        assertThat(attr.getLocalName()).isNull();
+        assertThat(attr.getNamespaceURI()).isNull();
     }
 }



Mime
View raw message