843b7dd5c15b37d3eb30fdabf41c921f4a12383a
[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 java.util.Collections;
11 import org.eclipse.xtext.xbase.lib.CollectionLiterals;
12 import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeComplexUsesAugment;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeComplexUsesAugmentBuilder;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ContainerWithUses;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ContainerWithUsesBuilder;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.Top;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.TopBuilder;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelList;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListBuilder;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListKey;
22
23 /**
24  * The object initialization code in this class was generated by AssertDataObjects.
25  *
26  * @see AssertDataObjects
27  * @see AssertDataObjectsTest
28  */
29 public final class ExpectedObjects {
30
31     private ExpectedObjects() {
32
33     }
34
35     public static TopLevelList topLevelList() {
36         TopLevelListBuilder it = new TopLevelListBuilder();
37         TopLevelListKey topLevelListKey = new TopLevelListKey("foo");
38         it.withKey(topLevelListKey);
39         it.setName("foo");
40         TreeComplexUsesAugmentBuilder treeComplexUsesAugmentBuilder = new TreeComplexUsesAugmentBuilder();
41         ContainerWithUsesBuilder containerWithUsesBuilder = new ContainerWithUsesBuilder();
42         containerWithUsesBuilder.setLeafFromGrouping("foo");
43         ContainerWithUses containerWithUses = containerWithUsesBuilder.build();
44         treeComplexUsesAugmentBuilder.setContainerWithUses(containerWithUses);
45         TreeComplexUsesAugment treeComplexUsesAugment = treeComplexUsesAugmentBuilder.build();
46         it.addAugmentation(TreeComplexUsesAugment.class, treeComplexUsesAugment);
47         return it.build();
48     }
49
50     public static Top top() {
51         TopBuilder topBuilder = new TopBuilder();
52         final Procedure1<TopBuilder> _function = (TopBuilder it) -> {
53             TopLevelListBuilder topLevelListBuilder = new TopLevelListBuilder();
54             final Procedure1<TopLevelListBuilder> _function_1 = (TopLevelListBuilder it1) -> {
55                 it1.setName("foo");
56                 TreeComplexUsesAugmentBuilder treeComplexUsesAugmentBuilder = new TreeComplexUsesAugmentBuilder();
57                 final Procedure1<TreeComplexUsesAugmentBuilder> _function_2 = (TreeComplexUsesAugmentBuilder it2) -> {
58                     ContainerWithUsesBuilder containerWithUsesBuilder = new ContainerWithUsesBuilder();
59                     final Procedure1<ContainerWithUsesBuilder> _function_3 =
60                         (ContainerWithUsesBuilder it3) -> it3.setLeafFromGrouping("foo");
61                     ContainerWithUses doubleGreaterThan = XtendBuilderExtensions.operator_doubleGreaterThan(
62                                     containerWithUsesBuilder, _function_3);
63                     it2.setContainerWithUses(doubleGreaterThan);
64                 };
65                 TreeComplexUsesAugment doubleGreaterThan = XtendBuilderExtensions.operator_doubleGreaterThan(
66                                 treeComplexUsesAugmentBuilder, _function_2);
67                 it1.addAugmentation(TreeComplexUsesAugment.class, doubleGreaterThan);
68             };
69             TopLevelList doubleGreaterThan =
70                 XtendBuilderExtensions.operator_doubleGreaterThan(topLevelListBuilder, _function_1);
71             it.setTopLevelList(Collections.unmodifiableList(CollectionLiterals.newArrayList(doubleGreaterThan)));
72         };
73         return XtendBuilderExtensions.operator_doubleGreaterThan(topBuilder, _function);
74     }
75 }