Fix previous and add new PCE Junit test cases
[transportpce.git] / pce / src / test / java / org / opendaylight / transportpce / pce / gnpy / GnpyUtilitiesImplTest.java
1 /*
2  * Copyright © 2020 Orange Labs, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.transportpce.pce.gnpy;
9
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;
19
20 @Ignore
21
22 public class GnpyUtilitiesImplTest extends AbstractTest {
23
24     private GnpyUtilitiesImpl gnpyUtilitiesImpl;
25     private NetworkTransactionImpl networkTransaction;
26
27     @Before
28     public void setUp()throws Exception {
29         networkTransaction = new NetworkTransactionImpl(new RequestProcessor(this.getNewDataBroker()));
30
31         gnpyUtilitiesImpl = new GnpyUtilitiesImpl(networkTransaction, PceTestData.getPCE_test1_request_54());
32     }
33
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);
40     }
41
42     @Test(expected = Exception.class)
43     public void gnpyResponseOneDirectionTest() throws Exception {
44         gnpyUtilitiesImpl.gnpyResponseOneDirection(null);
45     }
46
47
48 }