1 /* Copyright (c) 2019 AT&T Intellectual Property. #
\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
7 # http://www.apache.org/licenses/LICENSE-2.0 #
\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
17 package org.oran.otf.api.tests.unit.models;
\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
24 public class ExecutionTest {
\r
25 private static TestExecution testExecution;
\r
28 public static void setup(){
\r
29 testExecution = new TestExecution();
\r
33 public void testExecutionHasGroupIdField(){
\r
34 Assertions.assertThat(testExecution).hasFieldOrProperty("groupId");
\r
37 public void testExecutionHasExecutorIdField(){
\r
38 Assertions.assertThat(testExecution).hasFieldOrProperty("executorId");
\r
41 public void testExecutionHasAsyncField(){
\r
42 Assertions.assertThat(testExecution).hasFieldOrProperty("async");
\r
45 public void testExecutionHasStartTimeField(){
\r
46 Assertions.assertThat(testExecution).hasFieldOrProperty("startTime");
\r
49 public void testExecutionHasEndTimeField(){
\r
50 Assertions.assertThat(testExecution).hasFieldOrProperty("endTime");
\r
53 public void testExecutionHasAsyncTopicField(){
\r
55 Assertions.assertThat(testExecution).hasFieldOrProperty("asyncTopic");
\r
58 public void testExecutionHasBussinessKeyField(){
\r
60 Assertions.assertThat(testExecution).hasFieldOrProperty("businessKey");
\r
63 public void testExecutionHasProcessInstanceIdField(){
\r
64 Assertions.assertThat(testExecution).hasFieldOrProperty("processInstanceId");
\r
67 public void testExecutionHasTestResultField(){
\r
69 Assertions.assertThat(testExecution).hasFieldOrProperty("testResult");
\r
72 public void testExecutionHasTestResultMessageField(){
\r
74 Assertions.assertThat(testExecution).hasFieldOrProperty("testResultMessage");
\r
77 public void testExecutionHasTestDetailsField(){
\r
79 Assertions.assertThat(testExecution).hasFieldOrProperty("testDetails");
\r
82 public void testExecutionHasTestHeadResultsField(){
\r
84 Assertions.assertThat(testExecution).hasFieldOrProperty("testHeadResults");
\r
87 public void testExecutionHasTestInstanceResultsField(){
\r
89 Assertions.assertThat(testExecution).hasFieldOrProperty("testInstanceResults");
\r
92 public void testExecutionHasHistoricEmailField(){
\r
94 Assertions.assertThat(testExecution).hasFieldOrProperty("historicEmail");
\r
97 public void testExecutionHasHistoricTestInstanceField(){
\r
99 Assertions.assertThat(testExecution).hasFieldOrProperty("historicTestInstance");
\r
102 public void testExecutionHasHistoricTestDefinitionField(){
\r
104 Assertions.assertThat(testExecution).hasFieldOrProperty("historicTestDefinition");
\r