From 7962fe55692954548da260f31528dfc434f17755 Mon Sep 17 00:00:00 2001 From: Bartosz Gardziejewski Date: Tue, 20 Aug 2019 15:53:19 +0200 Subject: increasing test coverage in openecomp-be api Issue-ID: SDC-2326 Signed-off-by: Bartosz Gardziejewski Change-Id: I93cc5183190fcbada2349b18f14fbec9c28f1ae5 --- .../item-rest/item-rest-types/pom.xml | 8 +++- .../sdcrests/item/types/ActivityLogDtoTest.java | 38 +++++++++++++++ .../sdcrests/item/types/ActivityStatusTest.java | 54 ++++++++++++++++++++++ .../sdcrests/item/types/CommitRequestDtoTest.java | 38 +++++++++++++++ .../item/types/ItemActionRequestDtoTest.java | 38 +++++++++++++++ .../sdcrests/item/types/ItemCreationDtoTest.java | 38 +++++++++++++++ .../openecomp/sdcrests/item/types/ItemDtoTest.java | 38 +++++++++++++++ .../sdcrests/item/types/RevisionDtoTest.java | 38 +++++++++++++++ .../item/types/RevisionRequestDtoTest.java | 38 +++++++++++++++ .../sdcrests/item/types/SubmitRequestDtoTest.java | 38 +++++++++++++++ .../item/types/VersionActionRequestDtoTest.java | 38 +++++++++++++++ .../sdcrests/item/types/VersionDtoTest.java | 38 +++++++++++++++ .../sdcrests/item/types/VersionRequestDtoTest.java | 38 +++++++++++++++ 13 files changed, 479 insertions(+), 1 deletion(-) create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ActivityLogDtoTest.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ActivityStatusTest.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/CommitRequestDtoTest.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ItemActionRequestDtoTest.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ItemCreationDtoTest.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ItemDtoTest.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/RevisionDtoTest.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/RevisionRequestDtoTest.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/SubmitRequestDtoTest.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/VersionActionRequestDtoTest.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/VersionDtoTest.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/VersionRequestDtoTest.java (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/pom.xml index f3b5dbfa5d..0a368dfd4a 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/pom.xml @@ -28,7 +28,13 @@ openecomp-sdc-conflict-manager ${project.version} + + org.junit.jupiter + junit-jupiter-api + 5.3.1 + test + - \ No newline at end of file + diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ActivityLogDtoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ActivityLogDtoTest.java new file mode 100644 index 0000000000..8a740e2469 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ActivityLogDtoTest.java @@ -0,0 +1,38 @@ +/*- + * ============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.sdcrests.item.types; + +import org.junit.jupiter.api.Test; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.MatcherAssert.assertThat; + +class ActivityLogDtoTest { + @Test + void testBean() { + assertThat(ActivityLogDto.class, allOf( + hasValidBeanConstructor(), + hasValidGettersAndSetters() + )); + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ActivityStatusTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ActivityStatusTest.java new file mode 100644 index 0000000000..b643e718e5 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ActivityStatusTest.java @@ -0,0 +1,54 @@ +/*- + * ============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.sdcrests.item.types; + +import org.junit.jupiter.api.Test; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ActivityStatusTest { + + @Test + void testBean() { + assertThat(ActivityStatus.class, allOf( + hasValidBeanConstructor(), + hasValidGettersAndSetters() + )); + } + + @Test + void validateArgConstructors() { + + final String testMessage = "testMessage"; + + ActivityStatus activityStatus = new ActivityStatus(false); + assertEquals(activityStatus.isSuccess(),false); + + activityStatus = new ActivityStatus(true,testMessage); + assertEquals(activityStatus.isSuccess(),true); + assertEquals(activityStatus.getMessage(), testMessage); + } + +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/CommitRequestDtoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/CommitRequestDtoTest.java new file mode 100644 index 0000000000..8eb1b5e089 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/CommitRequestDtoTest.java @@ -0,0 +1,38 @@ +/*- + * ============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.sdcrests.item.types; + +import org.junit.jupiter.api.Test; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.MatcherAssert.assertThat; + +public class CommitRequestDtoTest { + @Test + void testBean() { + assertThat(CommitRequestDto.class, allOf( + hasValidBeanConstructor(), + hasValidGettersAndSetters() + )); + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ItemActionRequestDtoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ItemActionRequestDtoTest.java new file mode 100644 index 0000000000..9933e81909 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ItemActionRequestDtoTest.java @@ -0,0 +1,38 @@ +/*- + * ============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.sdcrests.item.types; + +import org.junit.jupiter.api.Test; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.MatcherAssert.assertThat; + +public class ItemActionRequestDtoTest { + @Test + void testBean() { + assertThat(ItemActionRequestDto.class, allOf( + hasValidBeanConstructor(), + hasValidGettersAndSetters() + )); + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ItemCreationDtoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ItemCreationDtoTest.java new file mode 100644 index 0000000000..e3050b121b --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ItemCreationDtoTest.java @@ -0,0 +1,38 @@ +/*- + * ============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.sdcrests.item.types; + +import org.junit.jupiter.api.Test; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.MatcherAssert.assertThat; + +class ItemCreationDtoTest { + @Test + void testBean() { + assertThat(ItemCreationDto.class, allOf( + hasValidBeanConstructor(), + hasValidGettersAndSetters() + )); + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ItemDtoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ItemDtoTest.java new file mode 100644 index 0000000000..742b60aa4d --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/ItemDtoTest.java @@ -0,0 +1,38 @@ +/*- + * ============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.sdcrests.item.types; + +import org.junit.jupiter.api.Test; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.MatcherAssert.assertThat; + +class ItemDtoTest { + @Test + void testBean() { + assertThat(ItemDto.class, allOf( + hasValidBeanConstructor(), + hasValidGettersAndSetters() + )); + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/RevisionDtoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/RevisionDtoTest.java new file mode 100644 index 0000000000..79287243b8 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/RevisionDtoTest.java @@ -0,0 +1,38 @@ +/*- + * ============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.sdcrests.item.types; + +import org.junit.jupiter.api.Test; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.MatcherAssert.assertThat; + +class RevisionDtoTest { + @Test + void testBean() { + assertThat(RevisionDto.class, allOf( + hasValidBeanConstructor(), + hasValidGettersAndSetters() + )); + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/RevisionRequestDtoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/RevisionRequestDtoTest.java new file mode 100644 index 0000000000..bef452b9bd --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/RevisionRequestDtoTest.java @@ -0,0 +1,38 @@ +/*- + * ============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.sdcrests.item.types; + +import org.junit.jupiter.api.Test; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.MatcherAssert.assertThat; + +class RevisionRequestDtoTest { + @Test + void testBean() { + assertThat(RevisionRequestDto.class, allOf( + hasValidBeanConstructor(), + hasValidGettersAndSetters() + )); + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/SubmitRequestDtoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/SubmitRequestDtoTest.java new file mode 100644 index 0000000000..94987de426 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/SubmitRequestDtoTest.java @@ -0,0 +1,38 @@ +/*- + * ============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.sdcrests.item.types; + +import org.junit.jupiter.api.Test; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.MatcherAssert.assertThat; + +class SubmitRequestDtoTest { + @Test + void testBean() { + assertThat(SubmitRequestDto.class, allOf( + hasValidBeanConstructor(), + hasValidGettersAndSetters() + )); + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/VersionActionRequestDtoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/VersionActionRequestDtoTest.java new file mode 100644 index 0000000000..94d9e37b25 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/VersionActionRequestDtoTest.java @@ -0,0 +1,38 @@ +/*- + * ============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.sdcrests.item.types; + +import org.junit.jupiter.api.Test; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.MatcherAssert.assertThat; + +class VersionActionRequestDtoTest { + @Test + void testBean() { + assertThat(VersionActionRequestDto.class, allOf( + hasValidBeanConstructor(), + hasValidGettersAndSetters() + )); + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/VersionDtoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/VersionDtoTest.java new file mode 100644 index 0000000000..50db26bab8 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/VersionDtoTest.java @@ -0,0 +1,38 @@ +/*- + * ============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.sdcrests.item.types; + +import org.junit.jupiter.api.Test; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.MatcherAssert.assertThat; + +class VersionDtoTest { + @Test + void testBean() { + assertThat(VersionDto.class, allOf( + hasValidBeanConstructor(), + hasValidGettersAndSetters() + )); + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/VersionRequestDtoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/VersionRequestDtoTest.java new file mode 100644 index 0000000000..20d651d6b9 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/test/java/org/openecomp/sdcrests/item/types/VersionRequestDtoTest.java @@ -0,0 +1,38 @@ +/*- + * ============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.sdcrests.item.types; + +import org.junit.jupiter.api.Test; + +import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; +import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.MatcherAssert.assertThat; + +class VersionRequestDtoTest { + @Test + void testBean() { + assertThat(VersionRequestDto.class, allOf( + hasValidBeanConstructor(), + hasValidGettersAndSetters() + )); + } +} -- cgit 1.2.3-korg