Search in sources :

Example 1 with Unkeyed

use of org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.container.Unkeyed in project mdsal by opendaylight.

the class TestListSquashing method testUserOrderedList.

@Test
public void testUserOrderedList() {
    final Keyed keyed = new KeyedBuilder().withKey(new KeyedKey("a")).build();
    final Unkeyed unkeyed = new UnkeyedBuilder().build();
    final Container cont = new ContainerBuilder().setKeyed(List.of(keyed)).setUnkeyed(List.of(unkeyed)).build();
    // Non-empty Lists should be retained
    assertEquals(List.of(keyed), cont.getKeyed());
    assertEquals(List.of(unkeyed), cont.getUnkeyed());
}
Also used : Container(org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.Container) KeyedBuilder(org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.container.KeyedBuilder) ContainerBuilder(org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.ContainerBuilder) KeyedKey(org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.container.KeyedKey) UnkeyedBuilder(org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.container.UnkeyedBuilder) Keyed(org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.container.Keyed) Unkeyed(org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.container.Unkeyed) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Container (org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.Container)1 ContainerBuilder (org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.ContainerBuilder)1 Keyed (org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.container.Keyed)1 KeyedBuilder (org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.container.KeyedBuilder)1 KeyedKey (org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.container.KeyedKey)1 Unkeyed (org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.container.Unkeyed)1 UnkeyedBuilder (org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal298.rev180129.container.UnkeyedBuilder)1