f673303b04e42fa1e5166017013d1832a60c32e6
[mdsal.git] / binding / mdsal-binding-test-utils / src / test / java / org / opendaylight / mdsal / binding / testutils / ExpectedObjects.java
1 /*
2  * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
3  *
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
7  */
8 package org.opendaylight.mdsal.binding.testutils;
9
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;
21
22 /**
23  * The object initialization code in this class was generated by AssertDataObjects.
24  *
25  * @see AssertDataObjects
26  * @see AssertDataObjectsTest
27  */
28 public final class ExpectedObjects {
29
30     private ExpectedObjects() {
31
32     }
33
34     public static TopLevelList topLevelList() {
35         TopLevelListBuilder it = new TopLevelListBuilder();
36         TopLevelListKey topLevelListKey = new TopLevelListKey("foo");
37         it.withKey(topLevelListKey);
38         it.setName("foo");
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);
46         return it.build();
47     }
48
49     public static Top top() {
50         return new TopBuilder()
51                 .setTopLevelList(Maps.uniqueIndex(Collections.singletonList(new TopLevelListBuilder()
52                     .setName("foo")
53                     .addAugmentation(TreeComplexUsesAugment.class, new TreeComplexUsesAugmentBuilder()
54                         .setContainerWithUses(new ContainerWithUsesBuilder().setLeafFromGrouping("foo").build())
55                         .build())
56                     .build()), TopLevelList::key))
57                 .build();
58     }
59 }