Increase test coverage - openecomp-sdc-tosca-generator-api 75/106975/2
authorvasraz <vasyl.razinkov@est.tech>
Fri, 1 May 2020 10:41:13 +0000 (11:41 +0100)
committerOfir Sonsino <ofir.sonsino@intl.att.com>
Wed, 6 May 2020 06:46:56 +0000 (06:46 +0000)
Change-Id: I1537d71b11ee440cb01bdee49350336f074ea36d
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-3001

12 files changed:
openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/ComputeFlavorTest.java [deleted file]
openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/DeploymentFlavorModelTest.java [deleted file]
openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/LicenseFlavorTest.java [deleted file]
openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/MultiFlavorVfcImageTest.java [deleted file]
openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/VendorInfoTest.java [deleted file]
openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/VspModelInfoTest.java [deleted file]
openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/datatypes/tosca/ComputeFlavor.java
openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/datatypes/tosca/DeploymentFlavorModel.java
openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/datatypes/tosca/LicenseFlavor.java
openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/datatypes/tosca/MultiFlavorVfcImage.java
openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/datatypes/tosca/VendorInfo.java
openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/src/main/java/org/openecomp/sdc/generator/datatypes/tosca/VspModelInfo.java

diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/ComputeFlavorTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/ComputeFlavorTest.java
deleted file mode 100644 (file)
index 08fcd5d..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============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.generator.datatypes.tosca;
-
-import org.junit.Test;
-
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
-import static org.junit.Assert.assertThat;
-
-public class ComputeFlavorTest {
-    @Test
-    public void accessorsTest() {
-        assertThat(ComputeFlavor.class, hasValidGettersAndSetters());
-    }
-
-    @Test
-    public void equalsTest() {
-        assertThat(ComputeFlavor.class, hasValidBeanEquals());
-    }
-
-    @Test
-    public void hashCodeTest() {
-        assertThat(ComputeFlavor.class, hasValidBeanHashCode());
-    }
-
-    @Test
-    public void toStringTest() {
-        assertThat(ComputeFlavor.class, hasValidBeanToString());
-    }
-}
\ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/DeploymentFlavorModelTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/DeploymentFlavorModelTest.java
deleted file mode 100644 (file)
index e26c11f..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============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.generator.datatypes.tosca;
-
-import org.junit.Test;
-
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
-import static org.junit.Assert.assertThat;
-
-public class DeploymentFlavorModelTest {
-    @Test
-    public void accessorsTest() {
-        assertThat(DeploymentFlavorModel.class, hasValidGettersAndSetters());
-    }
-
-    @Test
-    public void equalsTest() {
-        assertThat(DeploymentFlavorModel.class, hasValidBeanEquals());
-    }
-
-    @Test
-    public void hashCodeTest() {
-        assertThat(DeploymentFlavorModel.class, hasValidBeanHashCode());
-    }
-
-    @Test
-    public void toStringTest() {
-        assertThat(DeploymentFlavorModel.class, hasValidBeanToString());
-    }
-}
\ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/LicenseFlavorTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/LicenseFlavorTest.java
deleted file mode 100644 (file)
index 28e0f23..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============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.generator.datatypes.tosca;
-
-import org.junit.Test;
-
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
-import static org.junit.Assert.assertThat;
-
-public class LicenseFlavorTest {
-    @Test
-    public void accessorsTest() {
-        assertThat(LicenseFlavor.class, hasValidGettersAndSetters());
-    }
-
-    @Test
-    public void equalsTest() {
-        assertThat(LicenseFlavor.class, hasValidBeanEquals());
-    }
-
-    @Test
-    public void hashCodeTest() {
-        assertThat(LicenseFlavor.class, hasValidBeanHashCode());
-    }
-
-    @Test
-    public void toStringTest() {
-        assertThat(LicenseFlavor.class, hasValidBeanToString());
-    }
-}
\ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/MultiFlavorVfcImageTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/MultiFlavorVfcImageTest.java
deleted file mode 100644 (file)
index 20f2878..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============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.generator.datatypes.tosca;
-
-import org.junit.Test;
-
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
-import static org.junit.Assert.assertThat;
-
-public class MultiFlavorVfcImageTest {
-    @Test
-    public void accessorsTest() {
-        assertThat(MultiFlavorVfcImage.class, hasValidGettersAndSetters());
-    }
-
-    @Test
-    public void equalsTest() {
-        assertThat(MultiFlavorVfcImage.class, hasValidBeanEquals());
-    }
-
-    @Test
-    public void hashCodeTest() {
-        assertThat(MultiFlavorVfcImage.class, hasValidBeanHashCode());
-    }
-
-    @Test
-    public void toStringTest() {
-        assertThat(MultiFlavorVfcImage.class, hasValidBeanToString());
-    }
-}
\ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/VendorInfoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/VendorInfoTest.java
deleted file mode 100644 (file)
index 0cd6985..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============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.generator.datatypes.tosca;
-
-import org.junit.Test;
-
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
-import static org.junit.Assert.assertThat;
-
-public class VendorInfoTest {
-    @Test
-    public void accessorsTest() {
-        assertThat(VendorInfo.class, hasValidGettersAndSetters());
-    }
-
-    @Test
-    public void equalsTest() {
-        assertThat(VendorInfo.class, hasValidBeanEquals());
-    }
-
-    @Test
-    public void hashCodeTest() {
-        assertThat(VendorInfo.class, hasValidBeanHashCode());
-    }
-
-    @Test
-    public void toStringTest() {
-        assertThat(VendorInfo.class, hasValidBeanToString());
-    }
-}
\ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/VspModelInfoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-types/src/test/java/org/openecomp/sdc/generator/datatypes/tosca/VspModelInfoTest.java
deleted file mode 100644 (file)
index 0b7f2dd..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============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.generator.datatypes.tosca;
-
-import org.junit.Test;
-
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
-import static org.junit.Assert.assertThat;
-
-public class VspModelInfoTest {
-    @Test
-    public void accessorsTest() {
-        assertThat(VspModelInfo.class, hasValidGettersAndSetters());
-    }
-
-    @Test
-    public void equalsTest() {
-        assertThat(VspModelInfo.class, hasValidBeanEquals());
-    }
-
-    @Test
-    public void hashCodeTest() {
-        assertThat(VspModelInfo.class, hasValidBeanHashCode());
-    }
-
-    @Test
-    public void toStringTest() {
-        assertThat(VspModelInfo.class, hasValidBeanToString());
-    }
-}
\ No newline at end of file
index 4c3e1a6..f0d5472 100644 (file)
@@ -7,9 +7,9 @@
  * 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.
 
 package org.openecomp.sdc.generator.datatypes.tosca;
 
-@SuppressWarnings("CheckStyle")
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@EqualsAndHashCode
+@ToString
+@NoArgsConstructor
 public class ComputeFlavor {
 
-  private int num_cpus;
-  private String disk_size;
-  private String mem_size;
+    private int num_cpus;
+    private String disk_size;
+    private String mem_size;
 
-  public int getNum_cpus() {
-    return num_cpus;
-  }
-
-  public void setNum_cpus(int num_cpus) {
-    this.num_cpus = num_cpus;
-  }
-
-  public String getDisk_size() {
-    return disk_size;
-  }
-
-  public void setDisk_size(String disk_size) {
-    this.disk_size = disk_size;
-  }
-
-  public String getMem_size() {
-    return mem_size;
-  }
-
-  public void setMem_size(String mem_size) {
-    this.mem_size = mem_size;
-  }
-
-  @Override
-  public String toString() {
-    return "ComputeFlavor{ num_cpus=" + num_cpus + ", disk_size= " + disk_size
-        + ", mem_size=" + mem_size + "}";
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj)
-      return true;
-    if (obj == null || getClass() != obj.getClass())
-      return false;
-    ComputeFlavor other = (ComputeFlavor) obj;
-
-      if (num_cpus != other.num_cpus)
-        return false;
-      if (this.disk_size == null) {
-        if (other.disk_size != null)
-          return false;
-      } else if (!disk_size.equals(other.disk_size))
-        return false;
-      if (this.mem_size == null) {
-        if (other.mem_size != null)
-          return false;
-      } else if (!mem_size.equals(other.mem_size))
-        return false;
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = num_cpus;
-    result = 31 * result + (disk_size != null ? disk_size.hashCode() : 0);
-    result = 31 * result + (mem_size != null ? mem_size.hashCode() : 0);
-    return result;
-  }
 }
index 2474c1b..ae7952e 100644 (file)
@@ -7,9 +7,9 @@
  * 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.
 
 package org.openecomp.sdc.generator.datatypes.tosca;
 
-@SuppressWarnings("CheckStyle")
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString
+@EqualsAndHashCode
+@NoArgsConstructor
 public class DeploymentFlavorModel {
 
-  private String sp_part_number;
-  private VendorInfo vendor_info;
-  private ComputeFlavor compute_flavor;
-  private LicenseFlavor license_flavor;
+    private String sp_part_number;
+    private VendorInfo vendor_info;
+    private ComputeFlavor compute_flavor;
+    private LicenseFlavor license_flavor;
 
-  public String getSp_part_number() {
-    return sp_part_number;
-  }
-
-  public void setSp_part_number(String sp_part_number) {
-    this.sp_part_number = sp_part_number;
-  }
-
-  public VendorInfo getVendor_info() {
-    return vendor_info;
-  }
-
-  public void setVendor_info(VendorInfo vendor_info) {
-    this.vendor_info = vendor_info;
-  }
-
-  public ComputeFlavor getCompute_flavor() {
-    return compute_flavor;
-  }
-
-  public void setCompute_flavor(ComputeFlavor compute_flavor) {
-    this.compute_flavor = compute_flavor;
-  }
-
-  public LicenseFlavor getLicense_flavor() {
-    return license_flavor;
-  }
-
-  public void setLicense_flavor(LicenseFlavor license_flavor) {
-    this.license_flavor = license_flavor;
-  }
-
-  @Override
-  public String toString() {
-    return "DeploymentFlavorModel{" + "sp_part_number='" + sp_part_number + '\''
-        + ", vendor_info=" + vendor_info
-        + ", compute_flavor=" + compute_flavor
-        + ", license_flavor=" + license_flavor
-        + '}';
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj)
-      return true;
-    if (obj == null || getClass() != obj.getClass())
-      return false;
-    DeploymentFlavorModel other = (DeploymentFlavorModel) obj;
-
-      if (this.sp_part_number == null) {
-        if (other.sp_part_number != null)
-          return false;
-      } else if (!sp_part_number.equals(other.sp_part_number))
-        return false;
-      if (this.vendor_info == null) {
-        if (other.vendor_info != null)
-          return false;
-      } else if (!vendor_info.equals(other.vendor_info))
-        return false;
-      if (this.compute_flavor == null) {
-        if (other.compute_flavor != null)
-          return false;
-      } else if (!compute_flavor.equals(other.compute_flavor))
-        return false;
-      if (this.license_flavor == null) {
-        if (other.license_flavor != null)
-          return false;
-      } else if (!license_flavor.equals(other.license_flavor))
-        return false;
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = sp_part_number != null ? sp_part_number.hashCode() : 0;
-    result = 31 * result + (vendor_info != null ? vendor_info.hashCode() : 0);
-    result = 31 * result + (compute_flavor != null ? compute_flavor.hashCode() : 0);
-    result = 31 * result + (license_flavor != null ? license_flavor.hashCode() : 0);
-    return result;
-  }
 }
+
index b7f9dd8..0f7e5e8 100644 (file)
@@ -7,9 +7,9 @@
  * 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.
 
 package org.openecomp.sdc.generator.datatypes.tosca;
 
-@SuppressWarnings("CheckStyle")
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString
+@EqualsAndHashCode
+@NoArgsConstructor
 public class LicenseFlavor {
 
-  String feature_group_uuid;
+    private String feature_group_uuid;
 
-  public String getFeature_group_uuid() {
-    return feature_group_uuid;
-  }
-
-  public void setFeature_group_uuid(String feature_group_uuid) {
-    this.feature_group_uuid = feature_group_uuid;
-  }
-
-  @Override
-  public String toString() {
-    return "LicenseFlavor{"
-        + "feature_group_uuid='" + feature_group_uuid + '\''
-        + '}';
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj)
-      return true;
-    if (obj == null || getClass() != obj.getClass())
-      return false;
-    LicenseFlavor other = (LicenseFlavor) obj;
-
-      if (this.feature_group_uuid == null) {
-        if (other.feature_group_uuid != null)
-          return false;
-      } else if (!feature_group_uuid.equals(other.feature_group_uuid))
-        return false;
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    return feature_group_uuid != null ? feature_group_uuid.hashCode() : 0;
-  }
 }
index d6620ce..3c64231 100644 (file)
@@ -7,9 +7,9 @@
  * 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.
 
 package org.openecomp.sdc.generator.datatypes.tosca;
 
-@SuppressWarnings("CheckStyle")
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString
+@EqualsAndHashCode
+@NoArgsConstructor
 public class MultiFlavorVfcImage {
 
-  private String file_name;
-  private String file_hash;
-  private String file_hash_type;
-  private String software_version;
+    private String file_name;
+    private String file_hash;
+    private String file_hash_type;
+    private String software_version;
 
-  public String getFile_name() {
-    return file_name;
-  }
-
-  public void setFile_name(String file_name) {
-    this.file_name = file_name;
-  }
-
-  public String getFile_hash() {
-    return file_hash;
-  }
-
-  public void setFile_hash(String file_hash) {
-    this.file_hash = file_hash;
-  }
-
-  public String getFile_hash_type() {
-    return file_hash_type;
-  }
-
-  public void setFile_hash_type(String file_hash_type) {
-    this.file_hash_type = file_hash_type;
-  }
-
-  public String getSoftware_version() {
-    return software_version;
-  }
-
-  public void setSoftware_version(String software_version) {
-    this.software_version = software_version;
-  }
-
-  @Override
-  public String toString() {
-    return "MultiFlavorVfcImage{"
-        + "file_name='" + file_name + '\''
-        + ", file_hash='" + file_hash + '\''
-        + ", file_hash_type='" + file_hash_type + '\''
-        + ", software_version='" + software_version + '\''
-        + '}';
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj)
-      return true;
-    if (obj == null || getClass() != obj.getClass())
-      return false;
-    MultiFlavorVfcImage other = (MultiFlavorVfcImage) obj;
-
-      if (this.file_name == null) {
-        if (other.file_name != null)
-          return false;
-      } else if (!file_name.equals(other.file_name))
-        return false;
-      if (this.file_hash == null) {
-        if (other.file_hash != null)
-          return false;
-      } else if (!file_hash.equals(other.file_hash))
-        return false;
-      if (this.file_hash_type == null) {
-        if (other.file_hash_type != null)
-          return false;
-      } else if (!file_hash_type.equals(other.file_hash_type))
-        return false;
-      if (this.software_version == null) {
-        if (other.software_version != null)
-          return false;
-      } else if (!software_version.equals(other.software_version))
-        return false;
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = file_name != null ? file_name.hashCode() : 0;
-    result = 31 * result + (file_hash != null ? file_hash.hashCode() : 0);
-    result = 31 * result + (file_hash_type != null ? file_hash_type.hashCode() : 0);
-    result = 31 * result + (software_version != null ? software_version.hashCode() : 0);
-    return result;
-  }
 }
index d8d8cb6..1837841 100644 (file)
@@ -7,9 +7,9 @@
  * 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.
 
 package org.openecomp.sdc.generator.datatypes.tosca;
 
-@SuppressWarnings("CheckStyle")
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString
+@EqualsAndHashCode
+@NoArgsConstructor
 public class VendorInfo {
 
-  private String manufacturer_reference_number;
-  private String vendor_model;
+    private String manufacturer_reference_number;
+    private String vendor_model;
 
-  public String getManufacturer_reference_number() {
-    return manufacturer_reference_number;
-  }
-
-  public void setManufacturer_reference_number(String manufacturer_reference_number) {
-    this.manufacturer_reference_number = manufacturer_reference_number;
-  }
-
-  public String getVendor_model() {
-    return vendor_model;
-  }
-
-  public void setVendor_model(String vendor_model) {
-    this.vendor_model = vendor_model;
-  }
-
-  @Override
-  public String toString() {
-    return "VendorInfo{manufacturer_reference_number='" + manufacturer_reference_number + '\''
-        + ", vendor_model='" + vendor_model + '\'' + '}';
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj)
-      return true;
-    if (obj == null || getClass() != obj.getClass())
-      return false;
-    VendorInfo other = (VendorInfo) obj;
-
-      if (this.manufacturer_reference_number == null) {
-        if (other.manufacturer_reference_number != null)
-          return false;
-      } else if (!manufacturer_reference_number.equals(other.manufacturer_reference_number))
-        return false;
-      if (this.vendor_model == null) {
-        if (other.vendor_model != null)
-          return false;
-      } else if (!vendor_model.equals(other.vendor_model))
-        return false;
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    int result =
-        manufacturer_reference_number != null ? manufacturer_reference_number.hashCode() : 0;
-    result = 31 * result + (vendor_model != null ? vendor_model.hashCode() : 0);
-    return result;
-  }
 }
index 1eb1b32..05f43ce 100644 (file)
@@ -7,9 +7,9 @@
  * 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.
 
 package org.openecomp.sdc.generator.datatypes.tosca;
 
-import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
-
 import java.util.List;
 import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
 
+@Getter
+@Setter
+@ToString
+@EqualsAndHashCode
+@NoArgsConstructor
 public class VspModelInfo {
-  private String releaseVendor;
-  //Map of component id and name
-  private Map<String, String> components;
-  //Map of part number and deployment flavor model
-  private Map<String, DeploymentFlavorModel> allowedFlavors;
-  //Map of component id and images
-  private Map<String, List<MultiFlavorVfcImage>> multiFlavorVfcImages;
-  //Map of component and ports (NICs)
-  private Map<String, List<Nic>> nics;
-
-  public String getReleaseVendor() {
-    return releaseVendor;
-  }
-
-  public void setReleaseVendor(String releaseVendor) {
-    this.releaseVendor = releaseVendor;
-  }
-
-  public Map<String, String> getComponents() {
-    return components;
-  }
-
-  public void setComponents(Map<String, String> components) {
-    this.components = components;
-  }
-
-  public Map<String, DeploymentFlavorModel> getAllowedFlavors() {
-    return allowedFlavors;
-  }
-
-  public void setAllowedFlavors(Map<String, DeploymentFlavorModel> allowedFlavors) {
-    this.allowedFlavors = allowedFlavors;
-  }
-
-  public Map<String, List<MultiFlavorVfcImage>> getMultiFlavorVfcImages() {
-    return multiFlavorVfcImages;
-  }
-
-  public void setMultiFlavorVfcImages(Map<String, List<MultiFlavorVfcImage>> multiFlavorVfcImages) {
-    this.multiFlavorVfcImages = multiFlavorVfcImages;
-  }
-
-  public Map<String, List<Nic>> getNics() {
-    return nics;
-  }
-
-  public void setNics(Map<String, List<Nic>> nics) {
-    this.nics = nics;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = releaseVendor != null ? releaseVendor.hashCode() : 0;
-    result = 31 * result + (components != null ? components.hashCode() : 0);
-    result = 31 * result + (allowedFlavors != null ? allowedFlavors.hashCode() : 0);
-    result = 31 * result + (multiFlavorVfcImages != null ? multiFlavorVfcImages.hashCode() : 0);
-    result = 31 * result + (nics != null ? nics.hashCode() : 0);
-    return result;
-  }
-
-  @Override
-  public String toString() {
-    return "VspModelInfo{"
-       + "releaseVendor='" + releaseVendor + '\''
-       + ", components=" + components
-       + ", allowedFlavors=" + allowedFlavors
-       + ", multiFlavorVfcImages=" + multiFlavorVfcImages
-       + ", nics=" + nics
-       + '}';
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj) {
-      return true;
-    }
-    if (obj == null || getClass() != obj.getClass()) {
-      return false;
-    }
-    VspModelInfo other = (VspModelInfo) obj;
 
-      if (this.releaseVendor == null) {
-        if (other.releaseVendor != null) {
-          return false;
-        }
-      } else if (!releaseVendor.equals(other.releaseVendor)) {
-        return false;
-      }
-      if (this.components == null) {
-        if (other.components != null) {
-          return false;
-        }
-      } else if (!components.equals(other.components)) {
-        return false;
-      }
-      if (this.allowedFlavors == null) {
-        if (other.allowedFlavors != null) {
-          return false;
-        }
-      } else if (!allowedFlavors.equals(other.allowedFlavors)) {
-        return false;
-      }
-      if (this.multiFlavorVfcImages == null) {
-        if (other.multiFlavorVfcImages != null) {
-          return false;
-        }
-      } else if (!multiFlavorVfcImages.equals(other.multiFlavorVfcImages)) {
-        return false;
-      }
-      if (this.multiFlavorVfcImages == null) {
-        if (other.multiFlavorVfcImages != null) {
-          return false;
-        }
-      } else if (!multiFlavorVfcImages.equals(other.multiFlavorVfcImages)) {
-        return false;
-      }
-      if (this.nics == null) {
-        if (other.nics != null) {
-          return false;
-        }
-      } else if (!nics.equals(other.nics)) {
-        return false;
-      }
+    private String releaseVendor;
+    //Map of component id and name
+    private Map<String, String> components;
+    //Map of part number and deployment flavor model
+    private Map<String, DeploymentFlavorModel> allowedFlavors;
+    //Map of component id and images
+    private Map<String, List<MultiFlavorVfcImage>> multiFlavorVfcImages;
+    //Map of component and ports (NICs)
+    private Map<String, List<Nic>> nics;
 
-    return true;
-  }
 }