YANGTOOLS-813: add parent schemapath to error report
[yangtools.git] / yang / yang-data-codec-xml / src / test / java / org / opendaylight / yangtools / yang / data / codec / xml / StrictParsingModeTest.java
index fd15f68ba554d06aa0d8efb41c56a2b989767eb4..070b892464425948e6b0fa240d4744d37b59a60a 100644 (file)
@@ -8,8 +8,8 @@
 
 package org.opendaylight.yangtools.yang.data.codec.xml;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.io.InputStream;
@@ -78,8 +78,8 @@ public class StrictParsingModeTest {
             xmlParser.parse(reader);
             fail("IllegalStateException should have been thrown because of an unknown child node.");
         } catch (IllegalStateException ex) {
-            assertTrue(ex.getMessage().contains("Schema for node with name unknown-container-a and namespace "
-                    + "foo doesn't exist."));
+            assertEquals("Schema for node with name unknown-container-a and namespace foo doesn't exist at "
+                    + "AbsoluteSchemaPath{path=[(foo)top-level-container]}", ex.getMessage());
         }
     }
 }