update PceLink test object and NetworkService
[transportpce.git] / pce / src / test / java / org / opendaylight / transportpce / pce / PceSendingPceRPCsTest.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;
9
10 import org.junit.Assert;
11 import org.junit.Before;
12 import org.junit.Test;
13 import org.opendaylight.mdsal.binding.api.DataBroker;
14 import org.opendaylight.transportpce.common.DataStoreContext;
15 import org.opendaylight.transportpce.common.network.NetworkTransactionImpl;
16 import org.opendaylight.transportpce.common.network.RequestProcessor;
17 import org.opendaylight.transportpce.pce.utils.PceTestData;
18 import org.opendaylight.transportpce.pce.utils.PceTestUtils;
19 import org.opendaylight.transportpce.pce.utils.TransactionUtils;
20 import org.opendaylight.transportpce.test.AbstractTest;
21
22
23 //@RunWith(MockitoJUnitRunner.class)
24 public class PceSendingPceRPCsTest extends AbstractTest {
25
26     private PceSendingPceRPCs pceSendingPceRPCs;
27     private NetworkTransactionImpl networkTransaction;
28     private DataStoreContext dataStoreContext = this.getDataStoreContextUtil();
29     private DataBroker dataBroker = this.getDataBroker();
30
31
32     @Before
33     public void setUp() throws Exception {
34 //        PceTestUtils.writeTopologyIntoDataStore(
35 //                dataBroker, dataStoreContext, "./topologyData/NW-simple-topology.xml");
36         PceTestUtils.writeNetworkIntoDataStore(dataBroker, dataStoreContext, TransactionUtils.getNetworkForSpanLoss());
37         networkTransaction = new NetworkTransactionImpl(new RequestProcessor(dataBroker));
38         pceSendingPceRPCs = new PceSendingPceRPCs();
39         pceSendingPceRPCs =
40                 new PceSendingPceRPCs(PceTestData.getPCE_test1_request_54(), networkTransaction);
41     }
42
43     @Test
44     public void cancelResourceReserve() {
45         pceSendingPceRPCs.cancelResourceReserve();
46         Assert.assertEquals(true, pceSendingPceRPCs.getSuccess());
47     }
48
49     @Test
50     public void pathComputationTest() throws Exception {
51         pceSendingPceRPCs.pathComputation();
52
53     }
54
55     @Test
56     public void checkMessage() {
57         Assert.assertNull(pceSendingPceRPCs.getMessage());
58     }
59
60     @Test
61     public void responseCodeTest() {
62         Assert.assertNull(pceSendingPceRPCs.getResponseCode());
63     }
64
65     @Test
66     public void gnpyAtoZ() {
67         Assert.assertNull(pceSendingPceRPCs.getGnpyAtoZ());
68     }
69
70     @Test
71     public void getGnpyZtoA() {
72         Assert.assertNull(pceSendingPceRPCs.getGnpyZtoA());
73     }
74
75 }