diff options
author | 2021-01-22 11:49:51 -0500 | |
---|---|---|
committer | 2021-01-22 12:08:19 -0500 | |
commit | adcd4f2bc695840e9ecbc05003bc52c675f22fec (patch) | |
tree | 5db58ce9b6b3e86977ca3c697ce3e8998523eb61 /ms/sdclistener/application/src/test | |
parent | dc8252f3cfa1ddd0c1c8c70513c16c738d840822 (diff) |
Renaming Files having BluePrint to have Blueprint
Replacing BluePrint with Blueprint throughout
Issue-ID: CCSDK-3098
Signed-off-by: KAPIL SINGAL <ks220y@att.com>
Change-Id: Ibee8bad07ae7d9287073db2d4f2f2cd730fa8b96
Diffstat (limited to 'ms/sdclistener/application/src/test')
-rw-r--r-- | ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BlueprintProcessorHandlerTest.java (renamed from ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BluePrintProcessorHandlerTest.java) | 32 | ||||
-rw-r--r-- | ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java | 12 |
2 files changed, 22 insertions, 22 deletions
diff --git a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BluePrintProcessorHandlerTest.java b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BlueprintProcessorHandlerTest.java index 7cde45d9e..b48a98e15 100644 --- a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BluePrintProcessorHandlerTest.java +++ b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BlueprintProcessorHandlerTest.java @@ -30,9 +30,9 @@ import org.junit.runner.RunWith; import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers; import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader; import org.onap.ccsdk.cds.controllerblueprints.common.api.Status; -import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput; -import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementServiceGrpc.BluePrintManagementServiceImplBase; -import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput; +import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput; +import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementServiceGrpc.BlueprintManagementServiceImplBase; +import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput; import org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk; import org.onap.ccsdk.cds.controllerblueprints.management.api.UploadAction; import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor; @@ -50,12 +50,12 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @RunWith(SpringRunner.class) -@EnableConfigurationProperties({BluePrintProcesssorHandler.class, SdcListenerAuthClientInterceptor.class}) -@SpringBootTest(classes = {BluePrintProcessorHandlerTest.class}) -public class BluePrintProcessorHandlerTest { +@EnableConfigurationProperties({BlueprintProcesssorHandler.class, SdcListenerAuthClientInterceptor.class}) +@SpringBootTest(classes = {BlueprintProcessorHandlerTest.class}) +public class BlueprintProcessorHandlerTest { @Autowired - private BluePrintProcesssorHandler bluePrintProcesssorHandler; + private BlueprintProcesssorHandler bluePrintProcesssorHandler; @Autowired private SdcListenerAuthClientInterceptor sdcListenerAuthClientInterceptor; @@ -70,11 +70,11 @@ public class BluePrintProcessorHandlerTest { @Before public void setUp() throws IOException { - final BluePrintManagementServiceImplBase serviceImplBase = new BluePrintManagementServiceImplBase() { + final BlueprintManagementServiceImplBase serviceImplBase = new BlueprintManagementServiceImplBase() { @Override - public void uploadBlueprint(BluePrintUploadInput request, - StreamObserver<BluePrintManagementOutput> responseObserver) { - responseObserver.onNext(getBluePrintManagementOutput()); + public void uploadBlueprint(BlueprintUploadInput request, + StreamObserver<BlueprintManagementOutput> responseObserver) { + responseObserver.onNext(getBlueprintManagementOutput()); responseObserver.onCompleted(); } }; @@ -93,7 +93,7 @@ public class BluePrintProcessorHandlerTest { @Test public void testApplicationEndPointSucess() throws IOException { // Arrange - BluePrintUploadInput request = generateRequest(); + BlueprintUploadInput request = generateRequest(); // Act Status output = bluePrintProcesssorHandler.sendRequest(request, channel); @@ -103,12 +103,12 @@ public class BluePrintProcessorHandlerTest { assertTrue(output.getMessage().contains(SUCCESS_MSG)); } - private BluePrintUploadInput generateRequest() throws IOException { + private BlueprintUploadInput generateRequest() throws IOException { File file = Paths.get(CBA_ARCHIVE).toFile(); byte[] bytes = FileUtils.readFileToByteArray(file); FileChunk fileChunk = FileChunk.newBuilder().setChunk(ByteString.copyFrom(bytes)).build(); - return BluePrintUploadInput.newBuilder() + return BlueprintUploadInput.newBuilder() .setCommonHeader(CommonHeader.newBuilder().setRequestId(UUID.randomUUID().toString()) .setSubRequestId(UUID.randomUUID().toString()).setOriginatorId("SDC-LISTENER").build()) .setActionIdentifiers( @@ -116,8 +116,8 @@ public class BluePrintProcessorHandlerTest { .setFileChunk(fileChunk).build(); } - private BluePrintManagementOutput getBluePrintManagementOutput() { - return BluePrintManagementOutput.newBuilder() + private BlueprintManagementOutput getBlueprintManagementOutput() { + return BlueprintManagementOutput.newBuilder() .setStatus(Status.newBuilder().setMessage(SUCCESS_MSG).setCode(200).build()).build(); } diff --git a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java index 4179ccab0..2e55c8e25 100644 --- a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java +++ b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java @@ -29,7 +29,7 @@ import org.mockito.junit.MockitoRule; import org.onap.ccsdk.cds.sdclistener.SdcListenerConfiguration; import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor; import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto; -import org.onap.ccsdk.cds.sdclistener.handler.BluePrintProcesssorHandler; +import org.onap.ccsdk.cds.sdclistener.handler.BlueprintProcesssorHandler; import org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus; import org.onap.sdc.api.results.IDistributionClientDownloadResult; import org.onap.sdc.impl.mock.DistributionClientResultStubImpl; @@ -50,7 +50,7 @@ import static org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus.Notificati import static org.onap.sdc.utils.DistributionStatusEnum.COMPONENT_DONE_OK; @RunWith(SpringRunner.class) -@EnableConfigurationProperties({SdcListenerAuthClientInterceptor.class, BluePrintProcesssorHandler.class, +@EnableConfigurationProperties({SdcListenerAuthClientInterceptor.class, BlueprintProcesssorHandler.class, SdcListenerDto.class, ListenerServiceImpl.class, SdcListenerStatus.class, SdcListenerConfiguration.class}) @SpringBootTest(classes = {ListenerServiceImplTest.class}) public class ListenerServiceImplTest { @@ -90,9 +90,9 @@ public class ListenerServiceImplTest { } @Test - public void extractBluePrintSuccessfully() throws IOException { + public void extractBlueprintSuccessfully() throws IOException { // Act - listenerService.extractBluePrint(CSAR_SAMPLE, tempDirectoryPath.toString()); + listenerService.extractBlueprint(CSAR_SAMPLE, tempDirectoryPath.toString()); // Verify. String result = checkFileExists(tempDirectoryPath); @@ -100,7 +100,7 @@ public class ListenerServiceImplTest { } @Test - public void extractBluePrintFailure() { + public void extractBlueprintFailure() { // Arrange Mockito.when(listenerDto.getDistributionId()).thenReturn(DISTRIBUTION_ID); Mockito.when(listenerDto.getArtifactUrl()).thenReturn(URL); @@ -108,7 +108,7 @@ public class ListenerServiceImplTest { SDC_LISTENER_COMPONENT); // Act - listenerService.extractBluePrint(WRONG_CSAR_SAMPLE, tempDirectoryPath.toString()); + listenerService.extractBlueprint(WRONG_CSAR_SAMPLE, tempDirectoryPath.toString()); // Verify Mockito.verify(status).sendResponseBackToSdc(DISTRIBUTION_ID, COMPONENT_DONE_OK, null, URL, |