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.junit.runner.RunWith;
14 import org.mockito.junit.MockitoJUnitRunner;
15 import org.opendaylight.mdsal.binding.api.DataBroker;
16 import org.opendaylight.transportpce.common.DataStoreContext;
17 import org.opendaylight.transportpce.common.network.NetworkTransactionImpl;
18 import org.opendaylight.transportpce.common.network.RequestProcessor;
19 import org.opendaylight.transportpce.pce.utils.PceTestData;
20 import org.opendaylight.transportpce.test.AbstractTest;
24 @RunWith(MockitoJUnitRunner.class)
25 public class PceSendingPceRPCsTest extends AbstractTest {
27 private PceSendingPceRPCs pceSendingPceRPCs;
28 private NetworkTransactionImpl networkTransaction;
29 private DataStoreContext dataStoreContext = this.getDataStoreContextUtil();
30 private DataBroker dataBroker = dataStoreContext.getDataBroker();
34 public void setUp() throws Exception {
35 // PceTestUtils.writeTopologyIntoDataStore(
36 // dataBroker, dataStoreContext, "./topologyData/basePceTopology.json");
37 networkTransaction = new NetworkTransactionImpl(new RequestProcessor(dataBroker));
38 pceSendingPceRPCs = new PceSendingPceRPCs();
40 new PceSendingPceRPCs(PceTestData.getPCERequest(), networkTransaction
45 public void cancelResourceReserve() {
46 pceSendingPceRPCs.cancelResourceReserve();
47 Assert.assertEquals(true, pceSendingPceRPCs.getSuccess());
51 public void pathComputationTest() throws Exception {
52 pceSendingPceRPCs.pathComputation();
57 public void checkMessage() {
58 Assert.assertNull(pceSendingPceRPCs.getMessage());
62 public void responseCodeTest() {
63 Assert.assertNull(pceSendingPceRPCs.getResponseCode());
67 public void gnpyAtoZ() {
68 Assert.assertNull(pceSendingPceRPCs.getGnpyAtoZ());
72 public void getGnpyZtoA() {
73 Assert.assertNull(pceSendingPceRPCs.getGnpyZtoA());