diff options
author | mojahidi <mojahidul.islam@amdocs.com> | 2018-10-10 10:58:39 +0530 |
---|---|---|
committer | Vitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com> | 2018-10-10 09:24:45 +0000 |
commit | 1eda33de6c88b9c1d6259e74b50c55ab1bb9357a (patch) | |
tree | 13ba8ee7905d3eca067fef9616afa2e2ce77b92f /openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main | |
parent | 30bcbe8f02ea5fec868d0986c0b5185f8af7a5c7 (diff) |
Increased UT coverage -versioning-api-types
Increased UT coverage openecomp-sdc-versioning-api-types
Change-Id: I28098e79848315076e75777e957a5dfe6f1eb481
Issue-ID: SDC-1673
Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main')
4 files changed, 35 insertions, 188 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/Item.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/Item.java index 161c22c389..154bc40dad 100644 --- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/Item.java +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/Item.java @@ -1,5 +1,24 @@ +/* + * + * Copyright © 2017-2018 European Support Limited + * + * 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. + * + */ package org.openecomp.sdc.versioning.types; +import lombok.Getter; +import lombok.Setter; import org.openecomp.sdc.versioning.dao.types.VersionStatus; import java.util.Date; @@ -7,6 +26,8 @@ import java.util.EnumMap; import java.util.HashMap; import java.util.Map; +@Getter +@Setter public class Item { private String id; private String type; @@ -19,74 +40,10 @@ public class Item { private Date creationTime; private Date modificationTime; - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getOwner() { - return owner; - } - - public void setOwner(String owner) { - this.owner = owner; - } - - public ItemStatus getStatus() { - return status; - } - - public void setStatus(ItemStatus status) { - this.status = status; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Map<String, Object> getProperties() { - return properties; - } - public void addProperty(String key, Object value) { properties.put(key, value); } - public void setProperties(Map<String, Object> properties) { - this.properties = properties; - } - - public Map<VersionStatus, Integer> getVersionStatusCounters() { - return versionStatusCounters; - } - - public void setVersionStatusCounters(Map<VersionStatus, Integer> versionStatusCounters) { - this.versionStatusCounters = versionStatusCounters; - } - public void addVersionStatus(VersionStatus versionStatus) { Integer counter = versionStatusCounters.get(versionStatus); versionStatusCounters @@ -103,20 +60,4 @@ public class Item { } } } - - public Date getCreationTime() { - return creationTime; - } - - public void setCreationTime(Date creationTime) { - this.creationTime = creationTime; - } - - public Date getModificationTime() { - return modificationTime; - } - - public void setModificationTime(Date modificationTime) { - this.modificationTime = modificationTime; - } } diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/UniqueValueMetadata.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/UniqueValueMetadata.java index 21d42299fa..e12a42e2c4 100644 --- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/UniqueValueMetadata.java +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/UniqueValueMetadata.java @@ -20,30 +20,15 @@ package org.openecomp.sdc.versioning.types; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; import java.util.List; +@Getter +@Setter +@AllArgsConstructor public class UniqueValueMetadata { private String type; private List<String> uniqueConstraintIdentifiers; - - public UniqueValueMetadata(String type, List<String> contextIdentifierNames) { - this.type = type; - this.uniqueConstraintIdentifiers = contextIdentifierNames; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public List<String> getUniqueConstraintIdentifiers() { - return uniqueConstraintIdentifiers; - } - - public void setUniqueConstraintIdentifiers(List<String> uniqueConstraintIdentifiers) { - this.uniqueConstraintIdentifiers = uniqueConstraintIdentifiers; - } } diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionInfo.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionInfo.java index 02b5aaa3bd..a56c73d356 100644 --- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionInfo.java +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionInfo.java @@ -20,12 +20,16 @@ package org.openecomp.sdc.versioning.types; +import lombok.Getter; +import lombok.Setter; import org.openecomp.sdc.versioning.dao.types.Version; import org.openecomp.sdc.versioning.dao.types.VersionStatus; import java.util.ArrayList; import java.util.List; +@Getter +@Setter public class VersionInfo { private Version activeVersion; private Version latestFinalVersion; @@ -34,54 +38,6 @@ public class VersionInfo { private VersionStatus status; private String lockingUser; - public Version getActiveVersion() { - return activeVersion; - } - - public void setActiveVersion(Version activeVersion) { - this.activeVersion = activeVersion; - } - - public Version getLatestFinalVersion() { - return latestFinalVersion; - } - - public void setLatestFinalVersion(Version latestFinalVersion) { - this.latestFinalVersion = latestFinalVersion; - } - - public List<Version> getViewableVersions() { - return viewableVersions; - } - - public void setViewableVersions(List<Version> viewableVersions) { - this.viewableVersions = viewableVersions; - } - - public List<Version> getFinalVersions() { - return finalVersions; - } - - public void setFinalVersions(List<Version> finalVersions) { - this.finalVersions = finalVersions; - } - - public VersionStatus getStatus() { - return status; - } - - public void setStatus(VersionStatus status) { - this.status = status; - } - - public String getLockingUser() { - return lockingUser; - } - - public void setLockingUser(String lockingUser) { - this.lockingUser = lockingUser; - } - @Override public String toString() { final StringBuilder sb = new StringBuilder("VersionInfo{"); diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityMetadata.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityMetadata.java index 8ec54c9980..fcc02afd52 100644 --- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityMetadata.java +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityMetadata.java @@ -20,9 +20,13 @@ package org.openecomp.sdc.versioning.types; +import lombok.Getter; +import lombok.Setter; import java.util.ArrayList; import java.util.List; +@Getter +@Setter public class VersionableEntityMetadata { private VersionableEntityStoreType storeType; @@ -44,43 +48,4 @@ public class VersionableEntityMetadata { this.versionIdentifierName = versionIdentifierName; } - public VersionableEntityStoreType getStoreType() { - return storeType; - } - - public void setStoreType(VersionableEntityStoreType storeType) { - this.storeType = storeType; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getIdentifierName() { - return identifierName; - } - - public void setIdentifierName(String idColumnName) { - this.identifierName = idColumnName; - } - - public String getVersionIdentifierName() { - return versionIdentifierName; - } - - public void setVersionIdentifierName(String versionColumnName) { - this.versionIdentifierName = versionColumnName; - } - - public List<UniqueValueMetadata> getUniqueValuesMetadata() { - return uniqueValuesMetadata; - } - - public void setUniqueValuesMetadata(List<UniqueValueMetadata> uniqueValuesMetadata) { - this.uniqueValuesMetadata = uniqueValuesMetadata; - } } |