X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=otf-service-api%2Fsrc%2Ftest%2Fjava%2Forg%2Foran%2Fotf%2Fapi%2Ftests%2Funit%2Fmodels%2FDefinitionTest.java;fp=otf-service-api%2Fsrc%2Ftest%2Fjava%2Forg%2Foran%2Fotf%2Fapi%2Ftests%2Funit%2Fmodels%2FDefinitionTest.java;h=be607d16ae66757e068fb907499072b71c4407e7;hb=14f6f95c84a4a1fa8774190db4a03fd0214ec55f;hp=0000000000000000000000000000000000000000;hpb=f49bd1efeaaddd4891c1f329b18d8cfb28b3e75b;p=it%2Fotf.git diff --git a/otf-service-api/src/test/java/org/oran/otf/api/tests/unit/models/DefinitionTest.java b/otf-service-api/src/test/java/org/oran/otf/api/tests/unit/models/DefinitionTest.java new file mode 100644 index 0000000..be607d1 --- /dev/null +++ b/otf-service-api/src/test/java/org/oran/otf/api/tests/unit/models/DefinitionTest.java @@ -0,0 +1,82 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + +package org.oran.otf.api.tests.unit.models; + +import org.oran.otf.common.model.TestDefinition; +import org.assertj.core.api.Assertions; +import org.junit.BeforeClass; +import org.junit.Test; + +public class DefinitionTest { + private static TestDefinition testDefinition; + + @BeforeClass + public static void setup(){ + testDefinition = new TestDefinition(); + } + + @Test + public void testDefinitionHasTestNameField(){ + Assertions.assertThat(testDefinition).hasFieldOrProperty("testName"); + } + + @Test + public void testDefinitionHasTestDescriptionField(){ + Assertions.assertThat(testDefinition).hasFieldOrProperty("testDescription"); + } + @Test + public void testDefinitionHasProcessDefinitionKeyField(){ + Assertions.assertThat(testDefinition).hasFieldOrProperty("processDefinitionKey"); + } + @Test + public void testDefinitionHasBpmnInstancesField(){ + Assertions.assertThat(testDefinition).hasFieldOrProperty("bpmnInstances"); + } + @Test + public void testDefinitionHasGroupIdField(){ + Assertions.assertThat(testDefinition).hasFieldOrProperty("groupId"); + } + @Test + public void testDefinitionHasCreatedAtField(){ + Assertions.assertThat(testDefinition).hasFieldOrProperty("createdAt"); + } + @Test + public void testDefinitionHasUpdateAtField(){ + Assertions.assertThat(testDefinition).hasFieldOrProperty("updatedAt"); + } + @Test + public void testDefinitionHasCreatedByField(){ + Assertions.assertThat(testDefinition).hasFieldOrProperty("createdBy"); + } + @Test + public void testDefinitionHasUpdatedByField(){ + Assertions.assertThat(testDefinition).hasFieldOrProperty("updatedBy"); + } + @Test + public void testDefinitionHasDisabledField(){ + Assertions.assertThat(testDefinition).hasFieldOrProperty("disabled"); + } + + + + + + + + + +}