- public void testActionWithinListWithoutKey() throws Exception {
- try {
- StmtTestUtils.parseYangSource("/rfc7950/action-stmt/bar-invalid.yang");
- fail("Test should fail due to invalid Yang 1.1");
- } catch (final ReactorException e) {
- assertTrue(e.getCause().getMessage().startsWith(
- "Action (bar-namespace?revision=2016-12-13)my-action is defined within a list"
- + " that has no key statement"));
- }
+ public void testActionWithinListWithoutKey() {
+ assertSourceException(startsWith("Action (bar-namespace?revision=2016-12-13)my-action is defined within a list"
+ + " that has no key statement"), "/rfc7950/action-stmt/bar-invalid.yang");