2 * Copyright (c) 2017 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 ch.vorburger.xtendbeans.AssertBeans;
11 import org.junit.Test;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.yangtools.test.union.rev150121.LowestLevel2;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.yangtools.test.union.rev150121.UnionTestType;
16 * Tests YANG "type union" gen. code. These used to confuse the hell out of
17 * ch.vorburger.xtendbeans v1.2.0, and required a number of fixes in
20 * @author Michael Vorburger
22 public class UnionTest {
24 public void testUnionType() {
25 AssertBeans.assertEqualByText(
26 "new UnionTestType(new LowestLevel2(\"testValue\"))",
27 new UnionTestType(new LowestLevel2("testValue")));