aboutsummaryrefslogtreecommitdiffstats
path: root/common/onap-tosca-datatype/src/test
diff options
context:
space:
mode:
authorxuegao <xg353y@intl.att.com>2020-06-18 12:00:35 +0200
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-06-19 11:16:21 +0000
commit6152e450f7164c0a8e84da63e354c8c0ffccb237 (patch)
treef9bdf8c2c3c5e013da110fac15902ded7676e0c1 /common/onap-tosca-datatype/src/test
parent61aa954c94ddb1b60cb57d1c9d4b0908e0929487 (diff)
Remove unused method
Removing unused method in Constraint and use lombok annotations instead. Issue-ID: SDC-3130 Signed-off-by: xuegao <xg353y@intl.att.com> Change-Id: Ia718d184c55d40503f42830966bb11675b7c3f85 Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'common/onap-tosca-datatype/src/test')
-rw-r--r--common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ConstraintTest.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ConstraintTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ConstraintTest.java
new file mode 100644
index 0000000000..a67ed5a0e7
--- /dev/null
+++ b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ConstraintTest.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2020 AT&T Intellectual Property. 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.onap.sdc.tosca.datatypes.model;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class ConstraintTest {
+ @Test
+ public void shouldHaveValidGettersAndSetters() {
+ assertThat(Constraint.class, hasValidGettersAndSettersExcluding("in_range"));
+ }
+
+ @Test
+ public void setInRangeTest() {
+ Constraint constraint = new Constraint();
+ Object[] tmpInRange = new Object[] {"str1","str2","str3"};
+ constraint.setIn_range(tmpInRange);
+ assertEquals(constraint.getIn_range().length, 2);
+ assertEquals(constraint.getIn_range()[0], "str1");
+ assertEquals(constraint.getIn_range()[1], "str2");
+ }
+}