added svcapi ui and camunda code
[it/otf.git] / otf-service-api / src / test / java / org / oran / otf / api / tests / unit / models / ExecutionTest.java
1 /*  Copyright (c) 2019 AT&T Intellectual Property.                             #\r
2 #                                                                              #\r
3 #   Licensed under the Apache License, Version 2.0 (the "License");            #\r
4 #   you may not use this file except in compliance with the License.           #\r
5 #   You may obtain a copy of the License at                                    #\r
6 #                                                                              #\r
7 #       http://www.apache.org/licenses/LICENSE-2.0                             #\r
8 #                                                                              #\r
9 #   Unless required by applicable law or agreed to in writing, software        #\r
10 #   distributed under the License is distributed on an "AS IS" BASIS,          #\r
11 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
12 #   See the License for the specific language governing permissions and        #\r
13 #   limitations under the License.                                             #\r
14 ##############################################################################*/\r
15 \r
16 \r
17 package org.oran.otf.api.tests.unit.models;\r
18 \r
19 import org.oran.otf.common.model.TestExecution;\r
20 import org.assertj.core.api.Assertions;\r
21 import org.junit.BeforeClass;\r
22 import org.junit.Test;\r
23 \r
24 public class ExecutionTest {\r
25   private static TestExecution testExecution;\r
26 \r
27   @BeforeClass\r
28   public static void setup(){\r
29     testExecution = new TestExecution();\r
30   }\r
31 \r
32   @Test\r
33   public void testExecutionHasGroupIdField(){\r
34     Assertions.assertThat(testExecution).hasFieldOrProperty("groupId");\r
35   }\r
36   @Test\r
37   public void testExecutionHasExecutorIdField(){\r
38     Assertions.assertThat(testExecution).hasFieldOrProperty("executorId");\r
39   }\r
40   @Test\r
41   public void testExecutionHasAsyncField(){\r
42     Assertions.assertThat(testExecution).hasFieldOrProperty("async");\r
43   }\r
44   @Test\r
45   public void testExecutionHasStartTimeField(){\r
46     Assertions.assertThat(testExecution).hasFieldOrProperty("startTime");\r
47   }\r
48   @Test\r
49   public void testExecutionHasEndTimeField(){\r
50     Assertions.assertThat(testExecution).hasFieldOrProperty("endTime");\r
51   }\r
52   @Test\r
53   public void testExecutionHasAsyncTopicField(){\r
54 \r
55     Assertions.assertThat(testExecution).hasFieldOrProperty("asyncTopic");\r
56   }\r
57   @Test\r
58   public void testExecutionHasBussinessKeyField(){\r
59 \r
60     Assertions.assertThat(testExecution).hasFieldOrProperty("businessKey");\r
61   }\r
62   @Test\r
63   public void testExecutionHasProcessInstanceIdField(){\r
64     Assertions.assertThat(testExecution).hasFieldOrProperty("processInstanceId");\r
65   }\r
66   @Test\r
67   public void testExecutionHasTestResultField(){\r
68 \r
69     Assertions.assertThat(testExecution).hasFieldOrProperty("testResult");\r
70   }\r
71   @Test\r
72   public void testExecutionHasTestResultMessageField(){\r
73 \r
74     Assertions.assertThat(testExecution).hasFieldOrProperty("testResultMessage");\r
75   }\r
76   @Test\r
77   public void testExecutionHasTestDetailsField(){\r
78 \r
79     Assertions.assertThat(testExecution).hasFieldOrProperty("testDetails");\r
80   }\r
81   @Test\r
82   public void testExecutionHasTestHeadResultsField(){\r
83 \r
84     Assertions.assertThat(testExecution).hasFieldOrProperty("testHeadResults");\r
85   }\r
86   @Test\r
87   public void testExecutionHasTestInstanceResultsField(){\r
88 \r
89     Assertions.assertThat(testExecution).hasFieldOrProperty("testInstanceResults");\r
90   }\r
91   @Test\r
92   public void testExecutionHasHistoricEmailField(){\r
93 \r
94     Assertions.assertThat(testExecution).hasFieldOrProperty("historicEmail");\r
95   }\r
96   @Test\r
97   public void testExecutionHasHistoricTestInstanceField(){\r
98 \r
99     Assertions.assertThat(testExecution).hasFieldOrProperty("historicTestInstance");\r
100   }\r
101   @Test\r
102   public void testExecutionHasHistoricTestDefinitionField(){\r
103 \r
104     Assertions.assertThat(testExecution).hasFieldOrProperty("historicTestDefinition");\r
105   }\r
106 \r
107 }\r