2 * Copyright (c) 2016 Cisco Systems, 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.generator.impl;
10 import static org.junit.Assert.assertNotNull;
11 import static org.junit.Assert.assertTrue;
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;
20 public class ControllerTest {
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);
29 final BindingGenerator bindingGen = new BindingGeneratorImpl(true);
30 final List<Type> genTypes = bindingGen.generateTypes(context);
32 assertNotNull(genTypes);
33 assertTrue(!genTypes.isEmpty());