2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright 2018 TechMahindra
6 *=================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 package org.onap.appc.workflow.objects;
22 import static org.junit.Assert.*;
24 import org.junit.Assert;
25 import org.junit.Before;
26 import org.junit.Test;
28 public class TestWorkflowExistsOutput {
29 private WorkflowExistsOutput workflowExistsOutput;
31 private WorkflowExistsOutput workflowExistsOutput1;
34 workflowExistsOutput=new WorkflowExistsOutput();
35 workflowExistsOutput1=new WorkflowExistsOutput(true,true);
39 public void testGetWorkflowName() {
40 workflowExistsOutput.setWorkflowName("workflowName");
41 Assert.assertNotNull(workflowExistsOutput.getWorkflowName());
42 Assert.assertEquals(workflowExistsOutput.getWorkflowName(), "workflowName");
46 public void testGetWorkflowVersion() {
47 workflowExistsOutput.setWorkflowVersion("1.0");
48 Assert.assertNotNull(workflowExistsOutput.getWorkflowVersion());
49 Assert.assertEquals(workflowExistsOutput.getWorkflowVersion(), "1.0");
53 public void testGetWorkflowModule() {
54 workflowExistsOutput.setWorkflowModule("appc");
55 Assert.assertNotNull(workflowExistsOutput.getWorkflowModule());
56 Assert.assertEquals(workflowExistsOutput.getWorkflowModule(), "appc");
60 public void testMappingExist() {
61 workflowExistsOutput.setMappingExist(true);
62 Assert.assertNotNull(workflowExistsOutput.isMappingExist());
63 Assert.assertEquals(workflowExistsOutput.isMappingExist(), true);
67 public void testDgExist() {
68 workflowExistsOutput.setDgExist(true);
69 Assert.assertNotNull(workflowExistsOutput.isDgExist());
70 Assert.assertEquals(workflowExistsOutput.isDgExist(), true);
74 public void testexists() {
75 Assert.assertNotNull(workflowExistsOutput1.exists());
80 public void testToString_ReturnNonEmptyString() {
81 assertNotEquals(workflowExistsOutput.toString(), "");
82 assertNotEquals(workflowExistsOutput.toString(), null);
86 public void testToString_ContainsString() {
87 assertTrue(workflowExistsOutput.toString().contains("dgExist"));