blob: e65d4c81419f293e99877e1fdfbbd263e023c8d4 [file] [log] [blame]
Yixiao Chen39828a62016-09-14 14:37:06 -04001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016 Open Networking Foundation
Yixiao Chen39828a62016-09-14 14:37:06 -04003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.teyang.utils.topology;
17
Yixiao Chen39828a62016-09-14 14:37:06 -040018import org.junit.Before;
19import org.junit.Test;
Henry Yu4b4a7eb2016-11-09 20:07:53 -050020import org.onosproject.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev20151208.ietfnetwork.networks.Network;
Yixiao Chen39828a62016-09-14 14:37:06 -040021
22
23/**
24 * Unit tests for converter functions.
25 */
26public class ConverterTest {
27
28 Network output;
29
30 @Before
31 public void setUp() {
Henry Yu4b4a7eb2016-11-09 20:07:53 -050032 /*
Yixiao Chen39828a62016-09-14 14:37:06 -040033 output = NetworkConverter.teSubsystem2YangNetwork(
34 DefaultBuilder.sampleTeSubsystemNetworkBuilder(),
35 OperationType.NONE);
Henry Yu4b4a7eb2016-11-09 20:07:53 -050036 */
Yixiao Chen39828a62016-09-14 14:37:06 -040037 }
38
39 @Test
40 public void basics() {
Henry Yu4b4a7eb2016-11-09 20:07:53 -050041 //TODO: re-enable UT in the fallowing submission
42 /*
Yixiao Chen39828a62016-09-14 14:37:06 -040043 assertEquals("Wrong networkId",
44 output.networkId().uri().string(),
45 "HUAWEI_NETWORK_NEW");
46 assertEquals("Wrong 1st nodeId",
47 output.node().get(0).nodeId().uri().string(),
48 "HUAWEI_ROADM_1");
49 assertEquals("Wrong 2dn nodeId",
50 output.node().get(1).nodeId().uri().string(),
51 "HUAWEI_ROADM_2");
52 AugmentedNwNode augmentedNode = (AugmentedNwNode) output.node().get(0)
53 .yangAugmentedInfo(AugmentedNwNode.class);
54
55 assertEquals("Wrong adminStatus",
56 augmentedNode.te().config().teNodeAttributes().adminStatus(),
57 TeAdminStatus.of(TeAdminStatusEnum.UP));
Henry Yu4b4a7eb2016-11-09 20:07:53 -050058 */
Yixiao Chen39828a62016-09-14 14:37:06 -040059 }
60
61}