X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=pce%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fpce%2Fgnpy%2FGnpyUtilitiesImplTest.java;h=23289ae17337c8856f5ce8c27bc7abaecfa510ed;hb=2058c3a23deba4b6bdd50f3e1ea227d786b14289;hp=986d782fe5c979297c5f897650ea1dd8556d425e;hpb=de9c823434160ba713e598018cd1cfc09d8cbb08;p=transportpce.git diff --git a/pce/src/test/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImplTest.java b/pce/src/test/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImplTest.java index 986d782fe..23289ae17 100644 --- a/pce/src/test/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImplTest.java +++ b/pce/src/test/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImplTest.java @@ -8,17 +8,16 @@ package org.opendaylight.transportpce.pce.gnpy; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.opendaylight.transportpce.common.network.NetworkTransactionImpl; import org.opendaylight.transportpce.common.network.RequestProcessor; import org.opendaylight.transportpce.pce.constraints.PceConstraints; import org.opendaylight.transportpce.pce.constraints.PceConstraintsCalc; import org.opendaylight.transportpce.pce.utils.PceTestData; +import org.opendaylight.transportpce.pce.utils.PceTestUtils; +import org.opendaylight.transportpce.pce.utils.TransactionUtils; import org.opendaylight.transportpce.test.AbstractTest; -@Ignore - public class GnpyUtilitiesImplTest extends AbstractTest { private GnpyUtilitiesImpl gnpyUtilitiesImpl; @@ -26,13 +25,16 @@ public class GnpyUtilitiesImplTest extends AbstractTest { @Before public void setUp()throws Exception { - networkTransaction = new NetworkTransactionImpl(new RequestProcessor(this.getNewDataBroker())); + PceTestUtils.writeNetworkIntoDataStore(this.getDataBroker(), this.getDataStoreContextUtil(), + TransactionUtils.getNetworkForSpanLoss()); + networkTransaction = new NetworkTransactionImpl(new RequestProcessor(this.getDataBroker())); + - gnpyUtilitiesImpl = new GnpyUtilitiesImpl(networkTransaction, PceTestData.getPCE_test1_request_54()); } @Test(expected = Exception.class) public void askNewPathFromGnpyTest() throws Exception { + gnpyUtilitiesImpl = new GnpyUtilitiesImpl(networkTransaction, PceTestData.getPCERequest()); PceConstraintsCalc constraints = new PceConstraintsCalc(PceTestData.getPCE_simpletopology_test1_request(), networkTransaction); PceConstraints pceHardConstraints = constraints.getPceHardConstraints(); @@ -41,6 +43,7 @@ public class GnpyUtilitiesImplTest extends AbstractTest { @Test(expected = Exception.class) public void gnpyResponseOneDirectionTest() throws Exception { + gnpyUtilitiesImpl = new GnpyUtilitiesImpl(networkTransaction, PceTestData.getPCERequest()); gnpyUtilitiesImpl.gnpyResponseOneDirection(null); }