Refactored implementation of getBaseType method for yang built-in types.
[yangtools.git] / yang / yang-model-util / src / test / java / org / opendaylight / yangtools / yang / model / util / Int8Test.java
1 package org.opendaylight.yangtools.yang.model.util;
2
3 import static org.junit.Assert.*;
4
5 import org.junit.Test;
6
7 public class Int8Test {
8
9     @Test
10     public void testInt8() {
11         Int8 int8 = Int8.getInstance();
12         Int8 int8Second = Int8.getInstance();
13         assertTrue("The method 'getInstance()' has to return the same instance", int8 == int8Second);
14         assertTrue("The method 'getBaseType()' is returning incorrect value", int8.getBaseType() == null);
15         assertTrue("The method 'getDefaultType()' is returning incorrect value", int8.getDefaultValue() == null);
16         assertEquals("The method 'toString()' is returning incorrect value",
17                 "type (urn:ietf:params:xml:ns:yang:1)int8", int8.toString());
18
19     }
20
21 }