2 * Copyright © 2020 Orange Labs, Inc. 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.transportpce.pce.gnpy;
10 import org.junit.Before;
11 import org.junit.Ignore;
12 import org.junit.Test;
13 import org.opendaylight.transportpce.common.network.NetworkTransactionImpl;
14 import org.opendaylight.transportpce.common.network.RequestProcessor;
15 import org.opendaylight.transportpce.pce.constraints.PceConstraints;
16 import org.opendaylight.transportpce.pce.constraints.PceConstraintsCalc;
17 import org.opendaylight.transportpce.pce.utils.PceTestData;
18 import org.opendaylight.transportpce.test.AbstractTest;
22 public class GnpyUtilitiesImplTest extends AbstractTest {
24 private GnpyUtilitiesImpl gnpyUtilitiesImpl;
25 private NetworkTransactionImpl networkTransaction;
28 public void setUp()throws Exception {
29 networkTransaction = new NetworkTransactionImpl(new RequestProcessor(this.getNewDataBroker()));
31 gnpyUtilitiesImpl = new GnpyUtilitiesImpl(networkTransaction, PceTestData.getPCE_test1_request_54());
34 @Test(expected = Exception.class)
35 public void askNewPathFromGnpyTest() throws Exception {
36 PceConstraintsCalc constraints =
37 new PceConstraintsCalc(PceTestData.getPCE_simpletopology_test1_request(), networkTransaction);
38 PceConstraints pceHardConstraints = constraints.getPceHardConstraints();
39 gnpyUtilitiesImpl.askNewPathFromGnpy(pceHardConstraints);
42 @Test(expected = Exception.class)
43 public void gnpyResponseOneDirectionTest() throws Exception {
44 gnpyUtilitiesImpl.gnpyResponseOneDirection(null);