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;
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;
23 //@RunWith(MockitoJUnitRunner.class)
24 public class PceSendingPceRPCsTest extends AbstractTest {
26 private PceSendingPceRPCs pceSendingPceRPCs;
27 private NetworkTransactionImpl networkTransaction;
28 private DataStoreContext dataStoreContext = this.getDataStoreContextUtil();
29 private DataBroker dataBroker = this.getDataBroker();
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();
40 new PceSendingPceRPCs(PceTestData.getPCE_test1_request_54(), networkTransaction);
44 public void cancelResourceReserve() {
45 pceSendingPceRPCs.cancelResourceReserve();
46 Assert.assertEquals(true, pceSendingPceRPCs.getSuccess());
50 public void pathComputationTest() throws Exception {
51 pceSendingPceRPCs.pathComputation();
56 public void checkMessage() {
57 Assert.assertNull(pceSendingPceRPCs.getMessage());
61 public void responseCodeTest() {
62 Assert.assertNull(pceSendingPceRPCs.getResponseCode());
66 public void gnpyAtoZ() {
67 Assert.assertNull(pceSendingPceRPCs.getGnpyAtoZ());
71 public void getGnpyZtoA() {
72 Assert.assertNull(pceSendingPceRPCs.getGnpyZtoA());