diff options
author | Piotr Wielebski <piotr.wielebski@nokia.com> | 2019-07-16 09:13:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-16 09:13:43 +0000 |
commit | 80a07b807e248131b5a2c8b2c5b87324f0a2f6ab (patch) | |
tree | 9f58c082ddd704d3cb859345141debed7de27765 /prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapProducerTaskTestConfig.java | |
parent | 84c1e63afec4d99d9ed85cf97153a47e6528ca32 (diff) | |
parent | 48589757cdb485d5d320395e47a06d0e2afc3b78 (diff) |
Merge "Replace dummy prh workflow scheduling test generating fake code coverage with a prh workflow integration test with aai and dmaap mocked using wiremock and simple prh workflow scheduling test"
Diffstat (limited to 'prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapProducerTaskTestConfig.java')
-rw-r--r-- | prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapProducerTaskTestConfig.java | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapProducerTaskTestConfig.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapProducerTaskTestConfig.java deleted file mode 100644 index a6697163..00000000 --- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/DmaapProducerTaskTestConfig.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2018 NOKIA Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.dcaegen2.services.prh.tasks; - -import org.onap.dcaegen2.services.prh.configuration.CbsConfiguration; -import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.api.MessageRouterPublisher; -import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterPublishRequest; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Primary; - -import java.util.function.Supplier; - -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; - -/** - * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 4/13/18 - */ -@Configuration -public class DmaapProducerTaskTestConfig { - - /** - * Mocking bean for tests. - */ - @Bean - @Primary - public DmaapPublisherTask registerSimpleDmaapPublisherTask() { - final CbsConfiguration cbsConfiguration = mock(CbsConfiguration.class); - final Supplier<MessageRouterPublishRequest> configSupplier = cbsConfiguration::getMessageRouterPublishRequest; - doReturn(mock(MessageRouterPublishRequest.class)).when(cbsConfiguration).getMessageRouterPublishRequest(); - MessageRouterPublisher messageRouterPublisher = mock(MessageRouterPublisher.class); - return new DmaapPublisherTaskImpl(configSupplier, () -> messageRouterPublisher); - } -} |