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.networkanalyzer;
10 import org.junit.Assert;
11 import org.junit.Before;
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.PceConstraintsCalc;
16 import org.opendaylight.transportpce.pce.utils.PceTestData;
17 import org.opendaylight.transportpce.test.AbstractTest;
19 public class PceCalculationTest extends AbstractTest {
21 private PceCalculation pceCalculation;
26 PceResult pceResult = new PceResult();
27 pceResult.setRC("200");
29 PceConstraintsCalc pceConstraintsCalc = new PceConstraintsCalc(PceTestData
30 .getPCERequest(), new NetworkTransactionImpl(new RequestProcessor(this.getDataBroker())));
31 pceCalculation = new PceCalculation(
32 PceTestData.getPCERequest(),
33 new NetworkTransactionImpl(new RequestProcessor(this.getDataBroker())),
34 pceConstraintsCalc.getPceHardConstraints(),
35 pceConstraintsCalc.getPceSoftConstraints(),
42 public void testPceCalculationValues() {
44 pceCalculation.retrievePceNetwork();
45 Assert.assertEquals("100GE", pceCalculation.getServiceType());
46 Assert.assertNotNull(pceCalculation.getReturnStructure());
48 Assert.assertNull(pceCalculation.getaendPceNode());
49 Assert.assertNull(pceCalculation.getzendPceNode());