Populate data/ hierarchy
[yangtools.git] / model / yang-model-ri / src / test / java / org / opendaylight / yangtools / yang / model / ri / type / Int8Test.java
1 /*
2  * Copyright (c) 2014 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.yangtools.yang.model.ri.type;
9
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertNull;
12 import static org.junit.Assert.assertSame;
13
14 import java.util.Optional;
15 import org.junit.Test;
16 import org.opendaylight.yangtools.yang.model.api.type.Int8TypeDefinition;
17
18 public class Int8Test {
19     @Test
20     public void testInt8() {
21         Int8TypeDefinition int8 = BaseTypes.int8Type();
22         Int8TypeDefinition int8Second = BaseTypes.int8Type();
23         assertSame("The method 'getInstance()' has to return the same instance", int8, int8Second);
24         assertNull("The method 'getBaseType()' is returning incorrect value", int8.getBaseType());
25         assertEquals("The method 'getDefaultType()' is returning incorrect value", Optional.empty(),
26             int8.getDefaultValue());
27     }
28 }