Cleanup testutils implementation
[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.TreeComplexUsesAugmentBuilder;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ContainerWithUsesBuilder;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.Top;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.TopBuilder;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelList;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListBuilder;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListKey;
19
20 /**
21  * The object initialization code in this class was generated by AssertDataObjects.
22  *
23  * @see AssertDataObjects
24  * @see AssertDataObjectsTest
25  */
26 public final class ExpectedObjects {
27
28     private ExpectedObjects() {
29
30     }
31
32     public static TopLevelList topLevelList() {
33         return new TopLevelListBuilder()
34                 .withKey(new TopLevelListKey("foo"))
35                 .setName("foo")
36                 .addAugmentation(new TreeComplexUsesAugmentBuilder()
37                     .setContainerWithUses(new ContainerWithUsesBuilder().setLeafFromGrouping("foo").build())
38                     .build())
39                 .build();
40     }
41
42     public static Top top() {
43         return new TopBuilder()
44                 .setTopLevelList(Maps.uniqueIndex(Collections.singletonList(new TopLevelListBuilder()
45                     .setName("foo")
46                     .addAugmentation(new TreeComplexUsesAugmentBuilder()
47                         .setContainerWithUses(new ContainerWithUsesBuilder().setLeafFromGrouping("foo").build())
48                         .build())
49                     .build()), TopLevelList::key))
50                 .build();
51     }
52 }