blob: 21c602ce0be9df5f42ae23d491ab02c8ef0c2e24 [file] [log] [blame]
/*
* Copyright 2016-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.provider.te.utils;
import org.junit.Before;
import org.junit.Test;
import org.onosproject.yms.ych.YangCompositeEncoding;
import static org.junit.Assert.assertEquals;
import static org.onosproject.yms.ych.YangResourceIdentifierType.URI;
/**
* Unit test for YangCompositeEncodingImpl.
*/
public class YangCompositeEncodingImplTest {
private YangCompositeEncoding encode;
private static final String RES_ID = "/restconf/data/ietf";
private static final String RES_INFO = "tunnel";
private static final String C_FAILED = "Construct failed: ";
@Before
public void setup() {
encode = new YangCompositeEncodingImpl(URI,
RES_ID,
RES_INFO);
}
@Test
public void testConstruction() {
assertEquals(C_FAILED + "type", URI, encode.getResourceIdentifierType());
assertEquals(C_FAILED + "id", RES_ID, encode.getResourceIdentifier());
assertEquals(C_FAILED + "info", RES_INFO, encode.getResourceInformation());
}
}