summaryrefslogtreecommitdiffstats
path: root/appc-sdc-listener/appc-yang-generator/src/test/java/org/onap/appc/yang/type/TestYangTypes.java
blob: 778574f1cfe8810340f5f1c3249327d436255ee6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package org.onap.appc.yang.type;

import static org.junit.Assert.assertEquals;
import java.util.Map;
import org.junit.Test;

public class TestYangTypes {
    private Map<String, String> testTypeMap = YangTypes.getYangTypeMap();

    @Test
    public void testGetYangTypeMap_Size() {
        assertEquals(48, testTypeMap.size());
    }
    @Test(expected = java.lang.UnsupportedOperationException.class)
    public void testGetYangTypeMap_UnModifiableMap() {
        testTypeMap.remove("timeticks");
        assertEquals(47, testTypeMap.size());
    }
    @Test
    public void testGetYangTypeMap_ValidKey() {
        assertEquals("uint64", testTypeMap.get("uint64"));
    }
    @Test
    public void testGetYangTypeMap_In_ValidKey() {
        assertEquals(null, testTypeMap.get("uint128"));
    }

}