67fe76498010ba48586d27605e8c8e68099c6b12
[mdsal.git] / binding / mdsal-binding-test-model / src / test / java / org / opendaylight / mdsal / binding / test / model / TestCopyBuilders.java
1 /*
2  * Copyright (c) 2018 Pantheon Technologies, s.r.o. 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.test.model;
9
10 import static org.junit.Assert.assertEquals;
11
12 import org.junit.Test;
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.put.top.input.choice.list.choice.in.choice.list.ComplexViaUses;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.put.top.input.choice.list.choice.in.choice.list.ComplexViaUsesBuilder;
17
18 public class TestCopyBuilders {
19
20     @Test
21     public void testBuilderListCopy() {
22         final TreeComplexUsesAugment source = new TreeComplexUsesAugmentBuilder().build();
23         final ComplexViaUses viaUses = new ComplexViaUsesBuilder().build();
24         final TreeComplexUsesAugment copied = new TreeComplexUsesAugmentBuilder(viaUses).build();
25         assertEquals(source, copied);
26     }
27 }