2 * Copyright (c) 2014 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.yangtools.yang.model.util;
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertTrue;
13 import org.junit.Test;
15 public class Int8Test {
18 public void testInt8() {
19 Int8 int8 = Int8.getInstance();
20 Int8 int8Second = Int8.getInstance();
21 assertTrue("The method 'getInstance()' has to return the same instance", int8 == int8Second);
22 assertTrue("The method 'getBaseType()' is returning incorrect value", int8.getBaseType() == null);
23 assertTrue("The method 'getDefaultType()' is returning incorrect value", int8.getDefaultValue() == null);
24 assertEquals("The method 'toString()' is returning incorrect value",
25 "type (urn:ietf:params:xml:ns:yang:1)int8", int8.toString());