diff options
author | kurczews <krzysztof.kurczewski@nokia.com> | 2019-03-20 09:52:12 +0100 |
---|---|---|
committer | kurczews <krzysztof.kurczewski@nokia.com> | 2019-03-20 12:03:00 +0100 |
commit | f477d1d59382838c1cbeb3b73b325c7a4d535a3e (patch) | |
tree | e35b902b9029de7caaa323dd4d0f71d0c7e08aca /vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java | |
parent | 03359a5641dfb26f93d630a1b1232c0ffc6ec51c (diff) |
Add tests for AaiServiceImpl
Issue-ID: VID-386
Change-Id: Idbed927b9942c93d6b6ed7dd17fccb27a0853153
Signed-off-by: kurczews <krzysztof.kurczewski@nokia.com>
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java b/vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java index a8ded2719..fa53a9a80 100644 --- a/vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java @@ -3,13 +3,14 @@ * VID * ================================================================================ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019 - 2020 Nokia. 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. @@ -20,34 +21,23 @@ package org.onap.vid.services; -import java.util.*; +import static org.assertj.core.api.Assertions.assertThat; +import java.util.Arrays; +import java.util.Collection; import org.junit.Test; public class WorkflowServiceImplTest { - private WorkflowServiceImpl createTestSubject() { - return new WorkflowServiceImpl(); - } - @Test - public void testGetWorkflowsForVNFs() throws Exception { - WorkflowServiceImpl testSubject; - Collection<String> vnfNames = new ArrayList<String>(); - Collection<String> result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getWorkflowsForVNFs(vnfNames); + public void testGetWorkflowsForVNFs() { + Collection<String> result = new WorkflowServiceImpl().getWorkflowsForVNFs(Arrays.asList("VNF1", "VNF2")); + assertThat(result).containsExactly("Upgrade", "Clean", "Reinstall"); } @Test - public void testGetAllWorkflows() throws Exception { - WorkflowServiceImpl testSubject; - Collection<String> result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getAllWorkflows(); + public void testGetAllWorkflows() { + Collection<String> result = new WorkflowServiceImpl().getAllWorkflows(); + assertThat(result).containsExactly("Upgrade", "Clean", "Reinstall", "Dump", "Flush"); } } |