aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInfoTest.java
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2018-06-13 14:51:53 +0300
committerTal Gitelman <tg851x@intl.att.com>2018-06-13 14:51:53 +0300
commit364c0f559ca4ee0af4d8114dbfdaa57763eddaae (patch)
tree32b85b781e3f41b22d793b853e244b67c2556fde /catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInfoTest.java
parent87a2123d5ba98391499a36645122e78be9737a59 (diff)
Issue-ID: SDC-1342 replaced some junits
replaced junits under sdc/be/info refactored + added testcases for EcompUserConverter Change-Id: I569354fef87450cfccff827fe98e2ab7659113eb Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInfoTest.java')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInfoTest.java115
1 files changed, 12 insertions, 103 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInfoTest.java
index c2a1e82564..5642b2f1ef 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInfoTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInfoTest.java
@@ -1,112 +1,21 @@
package org.openecomp.sdc.be.info;
-import java.util.List;
-
import org.junit.Test;
+import com.google.code.beanmatchers.BeanMatchers;
+import static org.hamcrest.MatcherAssert.assertThat;
-public class ToscaNodeTypeInfoTest {
-
- private ToscaNodeTypeInfo createTestSubject() {
- return new ToscaNodeTypeInfo();
- }
-
-
- @Test
- public void testGetNodeName() throws Exception {
- ToscaNodeTypeInfo testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getNodeName();
- }
-
-
- @Test
- public void testSetNodeName() throws Exception {
- ToscaNodeTypeInfo testSubject;
- String nodeName = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setNodeName(nodeName);
- }
-
-
- @Test
- public void testGetTemplateVersion() throws Exception {
- ToscaNodeTypeInfo testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getTemplateVersion();
- }
-
-
- @Test
- public void testSetTemplateVersion() throws Exception {
- ToscaNodeTypeInfo testSubject;
- String templateVersion = "";
- // default test
- testSubject = createTestSubject();
- testSubject.setTemplateVersion(templateVersion);
- }
-
-
- @Test
- public void testGetInterfaces() throws Exception {
- ToscaNodeTypeInfo testSubject;
- List<ToscaNodeTypeInterface> result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getInterfaces();
- }
-
-
- @Test
- public void testSetInterfaces() throws Exception {
- ToscaNodeTypeInfo testSubject;
- List<ToscaNodeTypeInterface> interfaces = null;
-
- // default test
- testSubject = createTestSubject();
- testSubject.setInterfaces(interfaces);
- }
-
-
- @Test
- public void testGetIconPath() throws Exception {
- ToscaNodeTypeInfo testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getIconPath();
- }
-
-
- @Test
- public void testSetIconPath() throws Exception {
- ToscaNodeTypeInfo testSubject;
- String iconPath = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setIconPath(iconPath);
- }
+public class ToscaNodeTypeInfoTest {
-
- @Test
- public void testToString() throws Exception {
- ToscaNodeTypeInfo testSubject;
- String result;
- // default test
- testSubject = createTestSubject();
- result = testSubject.toString();
- }
+ @Test
+ public void shouldHaveValidGettersAndSetters() {
+ assertThat(ToscaNodeTypeInfo.class, BeanMatchers.hasValidGettersAndSetters());
+ }
+
+ @Test
+ public void allPropertiesShouldBeRepresentedInToStringOutput() {
+ assertThat(ToscaNodeTypeInfo.class, BeanMatchers.hasValidBeanToString());
+ }
} \ No newline at end of file