Propagate grouping inference flag
[mdsal.git] / binding / mdsal-binding-generator-impl / src / test / java / org / opendaylight / mdsal / binding / generator / impl / ControllerTest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, 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.generator.impl;
9
10 import static org.junit.Assert.assertNotNull;
11 import static org.junit.Assert.assertTrue;
12
13 import java.util.List;
14 import org.junit.Test;
15 import org.opendaylight.mdsal.binding.generator.api.BindingGenerator;
16 import org.opendaylight.mdsal.binding.model.api.Type;
17 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
18 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
19
20 public class ControllerTest {
21
22     @Test
23     public void controllerAugmentationTest() {
24         final SchemaContext context = YangParserTestUtils.parseYangResources(ControllerTest.class,
25             "/controller-models/controller-network.yang", "/controller-models/controller-openflow.yang",
26             "/ietf/ietf-inet-types.yang");
27         assertNotNull("Schema Context is null", context);
28
29         final BindingGenerator bindingGen = new BindingGeneratorImpl();
30         final List<Type> genTypes = bindingGen.generateTypes(context);
31
32         assertNotNull(genTypes);
33         assertTrue(!genTypes.isEmpty());
34     }
35 }