X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-parser-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fstmt%2Fretest%2FListKeysTest.java;h=9183fae91503ac95e3af1139c41ebc00f7f147f2;hb=refs%2Fchanges%2F68%2F32868%2F1;hp=7cdbb128a74ca6f52a7ffb0661d69dc6cb57bd41;hpb=247d8cbf37d124100f9b5263cca97ff5f29c76e7;p=yangtools.git diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/retest/ListKeysTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/retest/ListKeysTest.java index 7cdbb128a7..9183fae915 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/retest/ListKeysTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/retest/ListKeysTest.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the @@ -15,6 +15,7 @@ import java.io.IOException; import java.net.URISyntaxException; import org.junit.Test; import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException; +import org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor; import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangInferencePipeline; @@ -49,7 +50,7 @@ public class ListKeysTest { reactor.buildEffective(); fail("effective build should fail due to list instead of leaf referenced in list key"); } catch (Exception e) { - assertEquals(IllegalArgumentException.class, e.getClass()); + assertEquals(InferenceException.class, e.getClass()); assertTrue(e.getMessage().startsWith("Key 'test1_key1 test1_key2' misses node 'test1_key2'")); } } @@ -67,7 +68,7 @@ public class ListKeysTest { reactor.buildEffective(); fail("effective build should fail due to missing leaf referenced in list key"); } catch (Exception e) { - assertEquals(IllegalArgumentException.class, e.getClass()); + assertEquals(InferenceException.class, e.getClass()); assertTrue(e.getMessage().startsWith("Key 'test1_key1 test1_key2' misses node 'test1_key2'")); } } @@ -85,7 +86,7 @@ public class ListKeysTest { reactor.buildEffective(); fail("effective build should fail due to list instead of leaf in grouping referenced in list key"); } catch (Exception e) { - assertEquals(IllegalArgumentException.class, e.getClass()); + assertEquals(InferenceException.class, e.getClass()); assertTrue(e.getMessage().startsWith("Key 'grp_list' misses node 'grp_list'")); } } @@ -101,14 +102,16 @@ public class ListKeysTest { try { reactor.buildEffective(); - fail("effective build should fail due to list instead of leaf in grouping augmented to list referenced in list key"); + fail("effective build should fail due to list instead of leaf in grouping augmented to list referenced " + + "in list key"); } catch (Exception e) { - assertEquals(IllegalArgumentException.class, e.getClass()); + assertEquals(InferenceException.class, e.getClass()); assertTrue(e.getMessage().startsWith("Key 'grp_leaf' misses node 'grp_leaf'")); } } - private static void addSources(final CrossSourceStatementReactor.BuildAction reactor, final YangStatementSourceImpl... sources) { + private static void addSources(final CrossSourceStatementReactor.BuildAction reactor, + final YangStatementSourceImpl... sources) { for (YangStatementSourceImpl source : sources) { reactor.addSource(source); }