2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
5 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.sal.connector.remoterpc;
12 import com.fasterxml.jackson.core.JsonParseException;
13 import org.junit.Assert;
14 import org.junit.Test;
15 import org.opendaylight.controller.sal.connector.remoterpc.dto.RouteIdentifierImpl;
16 import org.opendaylight.yangtools.yang.common.QName;
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
20 public class RouteIdentifierImplTest {
22 Logger _logger = LoggerFactory.getLogger(RouteIdentifierImplTest.class);
24 private final URI namespace = URI.create("http://cisco.com/example");
25 private final QName QNAME = new QName(namespace, "heartbeat");
28 public void testToString() throws Exception {
29 RouteIdentifierImpl rId = new RouteIdentifierImpl();
32 _logger.debug(rId.toString());
34 Assert.assertTrue(true);
39 public void testFromString() throws Exception {
40 RouteIdentifierImpl rId = new RouteIdentifierImpl();
43 _logger.debug("route: " + rId.fromString(rId.toString()));
45 Assert.assertTrue(true);
48 @Test(expected = JsonParseException.class)
49 public void testFromInvalidString() throws Exception {
50 String invalidInput = "aklhdgadfa;;;;;;;]]]]=]ag" ;
51 RouteIdentifierImpl rId = new RouteIdentifierImpl();
52 rId.fromString(invalidInput);
54 _logger.debug("" + rId);
55 Assert.assertTrue(true);