X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=binding%2Fmdsal-binding-test-model%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fmdsal%2Fbinding%2Ftest%2Fmodel%2FTestListSquashing.java;h=9b9a340055cc28ebcd73233c8e68a9ebf8779413;hb=refs%2Fchanges%2F97%2F99697%2F6;hp=349c4359ccb487eacf13674dab145ab98feaa9d2;hpb=3cae231b09cdd529113ef0ae00e74bb109e3e830;p=mdsal.git diff --git a/binding/mdsal-binding-test-model/src/test/java/org/opendaylight/mdsal/binding/test/model/TestListSquashing.java b/binding/mdsal-binding-test-model/src/test/java/org/opendaylight/mdsal/binding/test/model/TestListSquashing.java index 349c4359cc..9b9a340055 100644 --- a/binding/mdsal-binding-test-model/src/test/java/org/opendaylight/mdsal/binding/test/model/TestListSquashing.java +++ b/binding/mdsal-binding-test-model/src/test/java/org/opendaylight/mdsal/binding/test/model/TestListSquashing.java @@ -12,6 +12,7 @@ import static org.junit.Assert.assertNull; import java.util.List; import java.util.Map; +import java.util.Set; import org.junit.Test; import org.opendaylight.yang.gen.v1.mdsal442.keydef.norev.Def; import org.opendaylight.yang.gen.v1.mdsal442.keydef.norev.DefBuilder; @@ -31,9 +32,16 @@ import org.opendaylight.yang.gen.v1.urn.test.pattern.rev170101.ContBuilder; public class TestListSquashing { @Test public void testEmptyLeafList() { - final Cont obj = new ContBuilder().setTest3(List.of()).build(); + final Cont obj = new ContBuilder().setTest3(Set.of()).build(); + // Eventhough return type is Set, it should be retained + assertEquals(Set.of(), obj.getTest3()); + } + + @Test + public void testEmptyUserOrderedLeafList() { + final Cont obj = new ContBuilder().setTest4(List.of()).build(); // Eventhough return type is List, it should be retained - assertEquals(List.of(), obj.getTest3()); + assertEquals(List.of(), obj.getTest4()); } @Test