From 41ce69ec659d4fe1568bb7cfa0fd353e0469dfd4 Mon Sep 17 00:00:00 2001 From: Tomasz Golabek Date: Thu, 22 Aug 2019 13:05:23 +0200 Subject: unit tests - catalog-be Additional junit tests Change-Id: Ief7f445521f7821e47715a44c423fd11a17568e1 Issue-ID: SDC-2326 Signed-off-by: Tomasz Golabek --- .../sdc/be/types/ServiceConsumptionDataTest.java | 32 ++++++++++++++++++ .../sdc/be/types/ServiceConsumptionSourceTest.java | 39 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/types/ServiceConsumptionDataTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/types/ServiceConsumptionSourceTest.java (limited to 'catalog-be') diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/types/ServiceConsumptionDataTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/types/ServiceConsumptionDataTest.java new file mode 100644 index 0000000000..17a5d720ad --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/types/ServiceConsumptionDataTest.java @@ -0,0 +1,32 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2019 Nokia. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ +package org.openecomp.sdc.be.types; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.junit.Assert.assertThat; + +import org.junit.Test; + +public class ServiceConsumptionDataTest { + @Test + public void shouldHaveValidGettersAndSetters() { + assertThat(ServiceConsumptionData.class, hasValidGettersAndSetters()); + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/types/ServiceConsumptionSourceTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/types/ServiceConsumptionSourceTest.java new file mode 100644 index 0000000000..9949151f7a --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/types/ServiceConsumptionSourceTest.java @@ -0,0 +1,39 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2019 Nokia. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ +package org.openecomp.sdc.be.types; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; + +public class ServiceConsumptionSourceTest { + + @Test + public void shouldReturnSourceValue() { + ServiceConsumptionSource serviceInput = ServiceConsumptionSource.getSourceValue("ServiceInput"); + assertEquals(serviceInput, ServiceConsumptionSource.SERVICE_INPUT); + } + + @Test + public void shouldReturnSource() { + String serviceInput = ServiceConsumptionSource.SERVICE_INPUT.getSource(); + assertEquals(serviceInput, "ServiceInput"); + } +} \ No newline at end of file -- cgit 1.2.3-korg