ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1683967 [3/3] - in /webservices/axiom/trunk: ./ axiom-api/ axiom-api/src/test/java/org/apache/axiom/om/ axiom-api/src/test/java/org/apache/axiom/om/impl/serialize/ axiom-compat/ axiom-compat/src/test/java/org/apache/axiom/om/impl/jaxp/ imp...
Date Sat, 06 Jun 2015 23:18:38 GMT
Added: webservices/axiom/trunk/testing/xml-truth/src/test/java/org/apache/axiom/truth/xml/XMLSubjectTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/xml-truth/src/test/java/org/apache/axiom/truth/xml/XMLSubjectTest.java?rev=1683967&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/xml-truth/src/test/java/org/apache/axiom/truth/xml/XMLSubjectTest.java
(added)
+++ webservices/axiom/trunk/testing/xml-truth/src/test/java/org/apache/axiom/truth/xml/XMLSubjectTest.java
Sat Jun  6 23:18:36 2015
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.truth.xml;
+
+import static com.google.common.truth.Truth.assertAbout;
+import static org.apache.axiom.truth.xml.XMLTruth.xml;
+
+import org.junit.Test;
+
+public class XMLSubjectTest {
+    @Test
+    public void testIgnoringRedundantNamespaceDeclarations1() {
+        assertAbout(xml())
+                .that(xml("<a xmlns:p='#1' xmlns=''><b xmlns:p='#1'/></a>"))
+                .ignoringRedundantNamespaceDeclarations()
+                .hasSameContentAs(xml("<a xmlns:p='#1'><b/></a>"));
+    }
+    
+    @Test(expected=AssertionError.class)
+    public void testIgnoringRedundantNamespaceDeclarations2() {
+        assertAbout(xml())
+                .that(xml("<a xmlns:p='#1'><b xmlns:p='#2'/></a>"))
+                .ignoringRedundantNamespaceDeclarations()
+                .hasSameContentAs(xml("<a xmlns:p='#1'><b/></a>"));
+    }
+}

Propchange: webservices/axiom/trunk/testing/xml-truth/src/test/java/org/apache/axiom/truth/xml/XMLSubjectTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message