- public void testNotification() throws Exception {
- try {
- StmtTestUtils.parseYangSource("/bugs/bug7424/foo-notification.yang");
- fail("Test should fail due to invalid yang model.");
- } catch (final SomeModifiersUnresolvedException e) {
- assertTrue(e.getCause().getMessage().startsWith(
- "Error in module 'foo': cannot add '(foo)name'. Node name collision: '(foo)name' already declared"));
- }
+ public void testNotification() {
+ assertSourceException(startsWith("Error in module 'foo': cannot add '(foo)name'. Node name collision:"
+ + " '(foo)name' already declared"), "/bugs/bug7424/foo-notification.yang");