2 * Copyright © 2015 ZTE 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.route;
10 import com.highstreet.technologies.odl.app.impl.delegates.PredefinePath;
11 import com.highstreet.technologies.odl.app.impl.tools.JsonUtil;
12 import org.junit.Test;
17 * Created by odl on 17-6-5.
22 public void test_to_object_given_json() throws Exception
24 String fileName = "/home/odl/workspace/CENTENNIAL/code/apps/route/impl/src/main/resources/topology.json";
25 PredefinePath path = JsonUtil.toObject(new File(fileName), PredefinePath.class);
27 System.out.println("");
31 public void test_to_obj_from_file()
33 PredefinePath path = JsonUtil.toObject(
34 new File(System.getenv().get("ODL_KARAF_HOME") + File.separator + "data" + File.separator + "topology.json"), PredefinePath.class);
35 System.out.println(path);