Clean up test naming confusion
[mdsal.git] / binding / mdsal-binding-generator-util / src / test / java / org / opendaylight / mdsal / binding / model / util / BaseYangTypesTest.java
1 /*
2  * Copyright (c) 2013 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.model.util;
9
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertTrue;
12
13 import org.junit.Test;
14 import org.opendaylight.mdsal.binding.model.api.ConcreteType;
15 import org.opendaylight.mdsal.binding.model.api.ParameterizedType;
16 import org.opendaylight.mdsal.binding.model.api.Type;
17
18 public class BaseYangTypesTest {
19     @Test
20     public void test() {
21         Type stringType = BaseYangTypes.javaTypeForYangType("string");
22         assertEquals("java.lang", stringType.getPackageName());
23         assertEquals("String", stringType.getName());
24         assertTrue(stringType instanceof ConcreteType);
25         ParameterizedType stringBooleanMap = Types.mapTypeFor(
26             BaseYangTypes.javaTypeForYangType("string"),
27             BaseYangTypes.javaTypeForYangType("boolean"));
28         assertTrue(!(stringBooleanMap instanceof ConcreteType));
29         assertEquals("java.util", stringBooleanMap.getPackageName());
30         assertEquals("Map", stringBooleanMap.getName());
31         assertEquals(2, stringBooleanMap.getActualTypeArguments().length);
32     }
33 }