- new NetworkTransactionImpl(new RequestProcessor(this.getDataBroker())),
- this.getNotificationPublishService());
- pathComputationServiceImpl.init();
+ networkTransactionService,
+ this.getNotificationPublishService(), null, null);
+ }
+
+ @Test
+ void pathComputationRequestTest() {
+ pathComputationServiceImpl.generateGnpyResponse(null,"path");
+ assertNotNull(
+ pathComputationServiceImpl.pathComputationRequest(PceTestData.getPCE_simpletopology_test1_request()));
+ }
+
+ @Test
+ void testPathComputationRequestNoPath() {
+ Response response = new ResponseBuilder()
+ .withKey(new ResponseKey("responseId")).setResponseType(new NoPathCaseBuilder()
+ .setNoPath(new NoPathBuilder().setNoPath("no path").build()).build()).build();
+
+ pathComputationServiceImpl.generateGnpyResponse(response,"path");
+ assertNotNull(pathComputationServiceImpl.pathComputationRequest(PceTestData.getPCE_test3_request_54()));
+ }
+
+ @Test
+ void testPathComputationRequestPathCase() {
+ PathMetric pathMetric = new PathMetricBuilder()
+ .setAccumulativeValue(Decimal64.valueOf("21"))
+ .setMetricType(PathBandwidth.VALUE).build();
+ Response response = new ResponseBuilder()
+ .withKey(new ResponseKey("responseId")).setResponseType(new PathCaseBuilder()
+ .setPathProperties(new PathPropertiesBuilder().setPathMetric(Map.of(pathMetric.key(),pathMetric))
+ .build()).build()).build();
+
+ pathComputationServiceImpl.generateGnpyResponse(response,"path");
+ assertNotNull(pathComputationServiceImpl.pathComputationRequest(PceTestData.getPCE_test3_request_54()));