2d158e9b8f0ab95b6aff216914965c90be8817b2
[sdc/sdc-workflow-designer.git] /
1 /**\r
2  * Copyright (c) 2018 ZTE Corporation.\r
3  * All rights reserved. This program and the accompanying materials\r
4  * are made available under the Apache License, Version 2.0\r
5  * and the Eclipse Public License v1.0 which both accompany this distribution,\r
6  * and are available at http://www.eclipse.org/legal/epl-v10.html\r
7  * and http://www.apache.org/licenses/LICENSE-2.0\r
8  *\r
9  * Contributors:\r
10  *     ZTE - initial API and implementation and/or initial documentation\r
11  */\r
12 package org.onap.sdc.workflowdesigner.model;\r
13 \r
14 import static org.junit.Assert.*;\r
15 \r
16 import java.util.ArrayList;\r
17 import java.util.List;\r
18 \r
19 import org.junit.After;\r
20 import org.junit.Before;\r
21 import org.junit.Test;\r
22 \r
23 /**\r
24  *\r
25  */\r
26 public class RestServiceTaskTest {\r
27 \r
28   /**\r
29    * @throws java.lang.Exception\r
30    */\r
31   @Before\r
32   public void setUp() throws Exception {}\r
33 \r
34   /**\r
35    * @throws java.lang.Exception\r
36    */\r
37   @After\r
38   public void tearDown() throws Exception {}\r
39 \r
40   @Test\r
41   public void test() {\r
42     List<String> produces = new ArrayList<>();\r
43     List<String> consumes = new ArrayList<>();\r
44     List<Parameter> parameters = new ArrayList<>();\r
45     String baseUrl = "";\r
46     String serviceName = "";\r
47     String serviceVersion = "";\r
48     String path = "";\r
49     String method = "";\r
50     \r
51     RestServiceTask rst = new RestServiceTask();\r
52     rst.setProduces(produces);\r
53     rst.setConsumes(consumes);\r
54     rst.setParameters(parameters);\r
55     rst.setBaseUrl(baseUrl);\r
56     rst.setServiceName(serviceName);\r
57     rst.setServiceVersion(serviceVersion);\r
58     rst.setPath(path);\r
59     rst.setMethod(method);\r
60     \r
61     assertEquals(produces, rst.getProduces());\r
62     assertEquals(consumes, rst.getConsumes());\r
63     assertEquals(parameters, rst.getParameters());\r
64     assertEquals(baseUrl, rst.getBaseUrl());\r
65     assertEquals(serviceName, rst.getServiceName());\r
66     assertEquals(serviceVersion, rst.getServiceVersion());\r
67     assertEquals(path, rst.getPath());\r
68     assertEquals(method, rst.getMethod());\r
69   }\r
70 \r
71 }\r