2 * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.binding.testutils;
10 import com.google.common.collect.Maps;
11 import java.util.Collections;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeComplexUsesAugment;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeComplexUsesAugmentBuilder;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ContainerWithUses;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ContainerWithUsesBuilder;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.Top;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.TopBuilder;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelList;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListBuilder;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListKey;
23 * The object initialization code in this class was generated by AssertDataObjects.
25 * @see AssertDataObjects
26 * @see AssertDataObjectsTest
28 public final class ExpectedObjects {
30 private ExpectedObjects() {
34 public static TopLevelList topLevelList() {
35 TopLevelListBuilder it = new TopLevelListBuilder();
36 TopLevelListKey topLevelListKey = new TopLevelListKey("foo");
37 it.withKey(topLevelListKey);
39 TreeComplexUsesAugmentBuilder treeComplexUsesAugmentBuilder = new TreeComplexUsesAugmentBuilder();
40 ContainerWithUsesBuilder containerWithUsesBuilder = new ContainerWithUsesBuilder();
41 containerWithUsesBuilder.setLeafFromGrouping("foo");
42 ContainerWithUses containerWithUses = containerWithUsesBuilder.build();
43 treeComplexUsesAugmentBuilder.setContainerWithUses(containerWithUses);
44 TreeComplexUsesAugment treeComplexUsesAugment = treeComplexUsesAugmentBuilder.build();
45 it.addAugmentation(TreeComplexUsesAugment.class, treeComplexUsesAugment);
49 public static Top top() {
50 return new TopBuilder()
51 .setTopLevelList(Maps.uniqueIndex(Collections.singletonList(new TopLevelListBuilder()
53 .addAugmentation(TreeComplexUsesAugment.class, new TreeComplexUsesAugmentBuilder()
54 .setContainerWithUses(new ContainerWithUsesBuilder().setLeafFromGrouping("foo").build())
56 .build()), TopLevelList::key))