diff --git a/src/main/java/org/openepics/names/repository/model/Name.java b/src/main/java/org/openepics/names/repository/model/Name.java index 64e3a4c05ac00cd2044599b69aeed44dd87c2148..68c8537a1b78668c38b9fadc2e5ae032d16589f0 100644 --- a/src/main/java/org/openepics/names/repository/model/Name.java +++ b/src/main/java/org/openepics/names/repository/model/Name.java @@ -92,8 +92,8 @@ public class Name extends NameStructure implements Serializable { * @param requestedComment requested comment */ public Name(UUID uuid, UUID systemGroupUuid, UUID systemUuid, UUID subsystemUuid, UUID deviceTypeUuid, - String index, String conventionName, String conventionNameEquivalence, - String description, Status status, Boolean latest, Boolean deleted, + String index, String conventionName, String conventionNameEquivalence, String description, + Status status, Boolean latest, Boolean deleted, Date requested, String requestedBy, String requestedComment) { setUuid(uuid); setSystemGroupUuid(systemGroupUuid); diff --git a/src/main/java/org/openepics/names/rest/api/v1/INames.java b/src/main/java/org/openepics/names/rest/api/v1/INames.java index 1ba1d2c4b688b5b08ad4ffbac26f95693670506f..e635d03ae905698e93cd1899cd165415a11e8233 100644 --- a/src/main/java/org/openepics/names/rest/api/v1/INames.java +++ b/src/main/java/org/openepics/names/rest/api/v1/INames.java @@ -61,20 +61,19 @@ import io.swagger.v3.oas.annotations.tags.Tag; public interface INames { /* - NameElementCommandCreate - parentSystemStructure, parentDeviceStructure, index, description, comment - NameElementCommandUpdate - uuid, parentSystemStructure, parentDeviceStructure, index, description, comment - NameElementCommandConfirm - uuid, comment + NameElementCommandCreate - parentSystemStructure, parentDeviceStructure, index, description + NameElementCommandUpdate - uuid, parentSystemStructure, parentDeviceStructure, index, description + NameElementCommandConfirm - uuid ---------------------------------------------------------------------------------------------------- converted into NameElementCommand ---------------------------------------------------------------------------------------------------- - NameElementCommand - uuid, parentSystemStructure, parentDeviceStructure, index, description, comment + NameElementCommand - uuid, parentSystemStructure, parentDeviceStructure, index, description NameElement uuid (UUID) parentSystemStructure (UUID) parentDeviceStructure (UUID) index (String) description (String) - comment (String) ---------------------------------- systemStructure (String) deviceStructure (String) @@ -84,6 +83,7 @@ public interface INames { deleted (Boolean) when (Date) who (String) + comment (String) Methods create POST /names - createNames @@ -139,7 +139,6 @@ public interface INames { Required attributes: - parentSystemStructure - description - - comment Optional attributes: - parentDeviceStructure @@ -200,7 +199,7 @@ public interface INames { array = @ArraySchema( schema = @Schema( implementation = NameElementCommandCreate.class, - requiredProperties = {"parentSystemStructure","description","comment"})))) + requiredProperties = {"parentSystemStructure","description"})))) @RequestBody List<NameElementCommandCreate> nameElementCommands); // ---------------------------------------------------------------------------------------------------- @@ -675,7 +674,6 @@ public interface INames { Required attributes: - parentSystemStructure - description - - comment Optional attributes: - parentDeviceStructure @@ -722,7 +720,7 @@ public interface INames { array = @ArraySchema( schema = @Schema( implementation = NameElementCommandCreate.class, - requiredProperties = {"parentSystemStructure","parentDeviceStructure","index","description","comment"})))) + requiredProperties = {"parentSystemStructure","parentDeviceStructure","index","description"})))) @RequestBody List<NameElementCommandCreate> nameElementCommands); /** @@ -748,7 +746,6 @@ public interface INames { - uuid - parentSystemStructure - description - - comment Optional attributes: - parentDeviceStructure @@ -792,7 +789,7 @@ public interface INames { array = @ArraySchema( schema = @Schema( implementation = NameElementCommandUpdate.class, - requiredProperties = {"uuid","parentSystemStructure","description","comment"})))) + requiredProperties = {"uuid","parentSystemStructure","description"})))) @RequestBody List<NameElementCommandUpdate> nameElementCommands); /** @@ -816,7 +813,6 @@ public interface INames { Required attributes: - uuid - - comment """ ) @ApiResponses(value = { @@ -856,7 +852,7 @@ public interface INames { array = @ArraySchema( schema = @Schema( implementation = NameElementCommandConfirm.class, - requiredProperties = {"uuid","comment"})))) + requiredProperties = {"uuid"})))) @RequestBody List<NameElementCommandConfirm> nameElementCommands); // ---------------------------------------------------------------------------------------------------- @@ -878,7 +874,6 @@ public interface INames { - uuid - parentSystemStructure - description - - comment Optional attributes: - parentDeviceStructure @@ -936,7 +931,7 @@ public interface INames { array = @ArraySchema( schema = @Schema( implementation = NameElementCommandUpdate.class, - requiredProperties = {"uuid","parentSystemStructure","description","comment"})))) + requiredProperties = {"uuid","parentSystemStructure","description"})))) @RequestBody List<NameElementCommandUpdate> nameElementCommands); // ---------------------------------------------------------------------------------------------------- @@ -955,7 +950,6 @@ public interface INames { Required attributes: - uuid - - comment """ ) @ApiResponses(value = { @@ -1000,7 +994,7 @@ public interface INames { array = @ArraySchema( schema = @Schema( implementation = NameElementCommandConfirm.class, - requiredProperties = {"uuid","comment"})))) + requiredProperties = {"uuid"})))) @RequestBody List<NameElementCommandConfirm> nameElementCommands); } diff --git a/src/main/java/org/openepics/names/rest/api/v1/IStructures.java b/src/main/java/org/openepics/names/rest/api/v1/IStructures.java index d1b02a30195ee7393d218465e955b2ba14eae763..9bd727e3f72c1aeccb96583d6e278d9ce4dda12d 100644 --- a/src/main/java/org/openepics/names/rest/api/v1/IStructures.java +++ b/src/main/java/org/openepics/names/rest/api/v1/IStructures.java @@ -64,9 +64,9 @@ import io.swagger.v3.oas.annotations.tags.Tag; public interface IStructures { /* - StructureElementCommandCreate - type, parent, mnemonic, ordering, description, comment - StructureElementCommandUpdate - uuid, type, parent, mnemonic, ordering, description, comment - StructureElementCommandConfirm - uuid, type, comment + StructureElementCommandCreate - type, parent, mnemonic, ordering, description + StructureElementCommandUpdate - uuid, type, parent, mnemonic, ordering, description + StructureElementCommandConfirm - uuid, type ---------------------------------------------------------------------------------------------------- converted into StructureElementCommand ---------------------------------------------------------------------------------------------------- @@ -78,7 +78,6 @@ public interface IStructures { mnemonic (String) ordering (String) description (String) - comment (String) ------------------------- mnemonicPath (String) level (Integer) @@ -87,6 +86,7 @@ public interface IStructures { deleted (Boolean) when (Date) who (String) + comment (String) Methods create POST /structures - createStructures @@ -147,7 +147,6 @@ public interface IStructures { Required attributes: - type - description - - comment Optional attributes: - parent @@ -211,7 +210,7 @@ public interface IStructures { array = @ArraySchema( schema = @Schema( implementation = StructureElementCommandCreate.class, - requiredProperties = {"type","description","comment"})))) + requiredProperties = {"type","description"})))) @RequestBody List<StructureElementCommandCreate> structureElementCommands); // ---------------------------------------------------------------------------------------------------- @@ -614,7 +613,6 @@ public interface IStructures { Required attributes: - type - description - - comment Optional attributes: - parent @@ -664,7 +662,7 @@ public interface IStructures { array = @ArraySchema( schema = @Schema( implementation = StructureElementCommandCreate.class, - requiredProperties = {"type","description","comment"})))) + requiredProperties = {"type","description"})))) @RequestBody List<StructureElementCommandCreate> structureElementCommands); /** @@ -696,7 +694,6 @@ public interface IStructures { - uuid - type - description - - comment Optional attributes: - parent @@ -745,7 +742,7 @@ public interface IStructures { array = @ArraySchema( schema = @Schema( implementation = StructureElementCommandUpdate.class, - requiredProperties = {"uuid","type","description","comment"})))) + requiredProperties = {"uuid","type","description"})))) @RequestBody List<StructureElementCommandUpdate> structureElementCommands); /** @@ -776,7 +773,6 @@ public interface IStructures { Required attributes: - uuid - type - - comment """ ) @ApiResponses(value = { @@ -816,7 +812,7 @@ public interface IStructures { array = @ArraySchema( schema = @Schema( implementation = StructureElementCommandConfirm.class, - requiredProperties = {"uuid","type","comment"})))) + requiredProperties = {"uuid","type"})))) @RequestBody List<StructureElementCommandConfirm> structureElementCommands); /** @@ -847,7 +843,6 @@ public interface IStructures { Required attributes: - uuid - type - - comment """ ) @ApiResponses(value = { @@ -887,7 +882,7 @@ public interface IStructures { array = @ArraySchema( schema = @Schema( implementation = StructureElementCommandConfirm.class, - requiredProperties = {"uuid","type","comment"})))) + requiredProperties = {"uuid","type"})))) @RequestBody List<StructureElementCommandConfirm> structureElementCommands); /** @@ -918,7 +913,6 @@ public interface IStructures { Required attributes: - uuid - type - - comment """ ) @ApiResponses(value = { @@ -958,7 +952,7 @@ public interface IStructures { array = @ArraySchema( schema = @Schema( implementation = StructureElementCommandConfirm.class, - requiredProperties = {"uuid","type","comment"})))) + requiredProperties = {"uuid","type"})))) @RequestBody List<StructureElementCommandConfirm> structureElementCommands); /** @@ -989,7 +983,6 @@ public interface IStructures { Required attributes: - uuid - type - - comment """ ) @ApiResponses(value = { @@ -1029,7 +1022,7 @@ public interface IStructures { array = @ArraySchema( schema = @Schema( implementation = StructureElementCommandConfirm.class, - requiredProperties = {"uuid","type","comment"})))) + requiredProperties = {"uuid","type"})))) @RequestBody List<StructureElementCommandConfirm> structureElementCommands); // ---------------------------------------------------------------------------------------------------- @@ -1051,7 +1044,6 @@ public interface IStructures { - uuid - type - description - - comment Optional attributes: - parent @@ -1114,7 +1106,7 @@ public interface IStructures { array = @ArraySchema( schema = @Schema( implementation = StructureElementCommandUpdate.class, - requiredProperties = {"uuid","type","description","comment"})))) + requiredProperties = {"uuid","type","description"})))) @RequestBody List<StructureElementCommandUpdate> structureElementCommands); // ---------------------------------------------------------------------------------------------------- @@ -1134,7 +1126,6 @@ public interface IStructures { Required attributes: - uuid - type - - comment """ ) @ApiResponses(value = { @@ -1179,7 +1170,7 @@ public interface IStructures { array = @ArraySchema( schema = @Schema( implementation = StructureElementCommandConfirm.class, - requiredProperties = {"uuid","type","comment"})))) + requiredProperties = {"uuid","type"})))) @RequestBody List<StructureElementCommandConfirm> structureElementCommands); // ---------------------------------------------------------------------------------------------------- @@ -1206,7 +1197,6 @@ public interface IStructures { Required attributes: - uuid - type - - comment """ ) @ApiResponses(value = { @@ -1255,7 +1245,7 @@ public interface IStructures { array = @ArraySchema( schema = @Schema( implementation = StructureElementCommandConfirm.class, - requiredProperties = {"uuid","type","comment"})))) + requiredProperties = {"uuid","type"})))) @RequestBody List<StructureElementCommandConfirm> structureElementCommands); /** @@ -1274,7 +1264,6 @@ public interface IStructures { Required attributes: - uuid - type - - comment """ ) @ApiResponses(value = { @@ -1323,7 +1312,7 @@ public interface IStructures { array = @ArraySchema( schema = @Schema( implementation = StructureElementCommandConfirm.class, - requiredProperties = {"uuid","type","comment"})))) + requiredProperties = {"uuid","type"})))) @RequestBody List<StructureElementCommandConfirm> structureElementCommands); /** @@ -1342,7 +1331,6 @@ public interface IStructures { Required attributes: - uuid - type - - comment """ ) @ApiResponses(value = { @@ -1391,7 +1379,7 @@ public interface IStructures { array = @ArraySchema( schema = @Schema( implementation = StructureElementCommandConfirm.class, - requiredProperties = {"uuid","type","comment"})))) + requiredProperties = {"uuid","type"})))) @RequestBody List<StructureElementCommandConfirm> structureElementCommands); } diff --git a/src/main/java/org/openepics/names/rest/beans/element/NameElement.java b/src/main/java/org/openepics/names/rest/beans/element/NameElement.java index 3fc41fd5ecdf2109baa2df591b8417a1b2012bf8..bfa1e34ecaedf07303bc63ee4ce1d77e3bfd7be2 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/NameElement.java +++ b/src/main/java/org/openepics/names/rest/beans/element/NameElement.java @@ -60,6 +60,8 @@ public class NameElement extends NameElementCommand implements Serializable { private Date when; @Schema(description = "Name (user) of who created the name entry.") private String who; + @Schema(description = "Comment of the name entry.") + private String comment; /** * Public constructor. @@ -76,7 +78,6 @@ public class NameElement extends NameElementCommand implements Serializable { * @param parentDeviceStructure parent device structure uuid * @param index index * @param description description - * @param comment comment * @param systemStructure system structure mnemonic path * @param deviceStructure device structure mnemonic path * @param name name @@ -85,14 +86,15 @@ public class NameElement extends NameElementCommand implements Serializable { * @param deleted deleted * @param when when * @param who who + * @param comment comment */ public NameElement( - UUID uuid, UUID parentSystemStructure, UUID parentDeviceStructure, String index, - String description, String comment, + UUID uuid, UUID parentSystemStructure, UUID parentDeviceStructure, + String index, String description, String systemStructure, String deviceStructure, String name, Status status, Boolean latest, Boolean deleted, - Date when, String who) { - super(uuid, parentSystemStructure, parentDeviceStructure, index, description, comment); + Date when, String who, String comment) { + super(uuid, parentSystemStructure, parentDeviceStructure, index, description); this.systemStructure = systemStructure; this.deviceStructure = deviceStructure; this.name = name; @@ -101,6 +103,7 @@ public class NameElement extends NameElementCommand implements Serializable { this.deleted = deleted; this.when = when; this.who = who; + this.comment = comment; } public String getSystemStructure() { @@ -151,6 +154,12 @@ public class NameElement extends NameElementCommand implements Serializable { public void setWho(String who) { this.who = who; } + public String getComment() { + return comment; + } + public void setComment(String comment) { + this.comment = comment; + } @Override public boolean equals(Object obj) { @@ -212,13 +221,18 @@ public class NameElement extends NameElementCommand implements Serializable { return false; } else if (!getWho().equals(other.getWho())) return false; + if (getComment() == null) { + if (other.getComment() != null) + return false; + } else if (!getComment().equals(other.getComment())) + return false; return true; } @Override public int hashCode() { - return Objects.hash(getUuid(), getWhen()); + return Objects.hash(getUuid(), getWhen(), getComment()); } @Override @@ -231,8 +245,8 @@ public class NameElement extends NameElementCommand implements Serializable { sb.append(", \"systemStructure\": " + getSystemStructure()); sb.append(", \"deviceStructure\": " + getDeviceStructure()); sb.append(", \"index\": " + getIndex()); - sb.append(", \"name\": " + getName()); sb.append(", \"description\": " + getDescription()); + sb.append(", \"name\": " + getName()); sb.append(", \"status\": " + getStatus()); sb.append(", \"latest\": " + isLatest()); sb.append(", \"deleted\": " + isDeleted()); diff --git a/src/main/java/org/openepics/names/rest/beans/element/NameElementCommand.java b/src/main/java/org/openepics/names/rest/beans/element/NameElementCommand.java index b75d15577e076b81802e751595e21bb1c6b212f0..8d7494e4cf3721a7d381b73c7cc8741fbaab791c 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/NameElementCommand.java +++ b/src/main/java/org/openepics/names/rest/beans/element/NameElementCommand.java @@ -51,8 +51,6 @@ public class NameElementCommand implements Serializable { private String index; @Schema(description = "Description (verbose) of the name entry.") private String description; - @Schema(description = "Comment of the name entry command.") - private String comment; /** * Public constructor. @@ -68,18 +66,16 @@ public class NameElementCommand implements Serializable { * @param parentDeviceStructure parent device structure uuid * @param index index * @param description description - * @param comment comment */ public NameElementCommand( - UUID uuid, UUID parentSystemStructure, UUID parentDeviceStructure, String index, - String description, String comment) { + UUID uuid, UUID parentSystemStructure, UUID parentDeviceStructure, + String index, String description) { super(); this.uuid = uuid; this.parentSystemStructure = parentSystemStructure; this.parentDeviceStructure = parentDeviceStructure; this.index = index; this.description = description; - this.comment = comment; } public UUID getUuid() { @@ -112,12 +108,6 @@ public class NameElementCommand implements Serializable { public void setDescription(String description) { this.description = description; } - public String getComment() { - return comment; - } - public void setComment(String comment) { - this.comment = comment; - } @Override public boolean equals(Object obj) { @@ -160,11 +150,6 @@ public class NameElementCommand implements Serializable { return false; } else if (!getDescription().equals(other.getDescription())) return false; - if (getComment() == null) { - if (other.getComment() != null) - return false; - } else if (!getComment().equals(other.getComment())) - return false; return true; } @@ -173,7 +158,7 @@ public class NameElementCommand implements Serializable { public int hashCode() { return Objects.hash( getUuid(), getParentSystemStructure(), getParentDeviceStructure(), getIndex(), - getDescription(), getComment()); + getDescription()); } @Override @@ -185,7 +170,6 @@ public class NameElementCommand implements Serializable { sb.append(", \"parentDeviceStructure\": " + getParentDeviceStructure()); sb.append(", \"index\": " + getIndex()); sb.append(", \"description\": " + getDescription()); - sb.append(", \"comment\": " + getComment()); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/openepics/names/rest/beans/element/NameElementCommandConfirm.java b/src/main/java/org/openepics/names/rest/beans/element/NameElementCommandConfirm.java index c305db947ca144716f826adf3bae80238c527acb..0cecd08422063adfdd79746ea6e7ec39ca2e58cb 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/NameElementCommandConfirm.java +++ b/src/main/java/org/openepics/names/rest/beans/element/NameElementCommandConfirm.java @@ -15,8 +15,6 @@ public class NameElementCommandConfirm implements Serializable { @Schema(description = "Identity (uuid) of the name entry. Value is created server-side.") private UUID uuid; - @Schema(description = "Comment of the name entry command.") - private String comment; /** * Public constructor. @@ -28,13 +26,11 @@ public class NameElementCommandConfirm implements Serializable { * Public constructor. * * @param uuid uuid - * @param comment comment */ public NameElementCommandConfirm( - UUID uuid, String comment) { + UUID uuid) { super(); this.uuid = uuid; - this.comment = comment; } public UUID getUuid() { @@ -43,12 +39,6 @@ public class NameElementCommandConfirm implements Serializable { public void setUuid(UUID uuid) { this.uuid = uuid; } - public String getComment() { - return comment; - } - public void setComment(String comment) { - this.comment = comment; - } @Override public boolean equals(Object obj) { @@ -71,11 +61,6 @@ public class NameElementCommandConfirm implements Serializable { return false; } else if (!getUuid().equals(other.getUuid())) return false; - if (getComment() == null) { - if (other.getComment() != null) - return false; - } else if (!getComment().equals(other.getComment())) - return false; return true; } @@ -90,7 +75,6 @@ public class NameElementCommandConfirm implements Serializable { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("\"uuid\": " + getUuid()); - sb.append(", \"comment\": " + getComment()); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/openepics/names/rest/beans/element/NameElementCommandCreate.java b/src/main/java/org/openepics/names/rest/beans/element/NameElementCommandCreate.java index 19a2a89e4b30ac71c805653416948b956a663b6a..57be55f41c51f163cd827261b161a143f0ad254f 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/NameElementCommandCreate.java +++ b/src/main/java/org/openepics/names/rest/beans/element/NameElementCommandCreate.java @@ -21,8 +21,6 @@ public class NameElementCommandCreate implements Serializable { private String index; @Schema(description = "Description (verbose) of the name entry.") private String description; - @Schema(description = "Comment of the name entry command.") - private String comment; /** * Public constructor. @@ -37,17 +35,15 @@ public class NameElementCommandCreate implements Serializable { * @param parentDeviceStructure parent device structure uuid * @param index index * @param description description - * @param comment comment */ public NameElementCommandCreate( - UUID parentSystemStructure, UUID parentDeviceStructure, String index, - String description, String comment) { + UUID parentSystemStructure, UUID parentDeviceStructure, + String index, String description) { super(); this.parentSystemStructure = parentSystemStructure; this.parentDeviceStructure = parentDeviceStructure; this.index = index; this.description = description; - this.comment = comment; } public UUID getParentSystemStructure() { @@ -74,12 +70,6 @@ public class NameElementCommandCreate implements Serializable { public void setDescription(String description) { this.description = description; } - public String getComment() { - return comment; - } - public void setComment(String comment) { - this.comment = comment; - } @Override public boolean equals(Object obj) { @@ -117,11 +107,6 @@ public class NameElementCommandCreate implements Serializable { return false; } else if (!getDescription().equals(other.getDescription())) return false; - if (getComment() == null) { - if (other.getComment() != null) - return false; - } else if (!getComment().equals(other.getComment())) - return false; return true; } @@ -130,7 +115,7 @@ public class NameElementCommandCreate implements Serializable { public int hashCode() { return Objects.hash( getParentSystemStructure(), getParentDeviceStructure(), getIndex(), - getDescription(), getComment()); + getDescription()); } @Override @@ -141,7 +126,6 @@ public class NameElementCommandCreate implements Serializable { sb.append(", \"parentDeviceStructure\": " + getParentDeviceStructure()); sb.append(", \"index\": " + getIndex()); sb.append(", \"description\": " + getDescription()); - sb.append(", \"comment\": " + getComment()); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/openepics/names/rest/beans/element/NameElementCommandUpdate.java b/src/main/java/org/openepics/names/rest/beans/element/NameElementCommandUpdate.java index b45ba7c4d40c28b1e9d4e1239537b0b2c09673b0..9375649f146f84e808fd5d0aa548c332cf1d7fcd 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/NameElementCommandUpdate.java +++ b/src/main/java/org/openepics/names/rest/beans/element/NameElementCommandUpdate.java @@ -30,12 +30,11 @@ public class NameElementCommandUpdate extends NameElementCommandCreate implement * @param parentDeviceStructure parent device structure uuid * @param index index * @param description description - * @param comment comment */ public NameElementCommandUpdate( - UUID uuid, UUID parentSystemStructure, UUID parentDeviceStructure, String index, - String description, String comment) { - super(parentSystemStructure, parentDeviceStructure, index, description, comment); + UUID uuid, UUID parentSystemStructure, UUID parentDeviceStructure, + String index, String description) { + super(parentSystemStructure, parentDeviceStructure, index, description); this.uuid = uuid; } @@ -89,7 +88,6 @@ public class NameElementCommandUpdate extends NameElementCommandCreate implement sb.append(", \"parentDeviceStructure\": " + getParentDeviceStructure()); sb.append(", \"index\": " + getIndex()); sb.append(", \"description\": " + getDescription()); - sb.append(", \"comment\": " + getComment()); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/openepics/names/rest/beans/element/StructureElement.java b/src/main/java/org/openepics/names/rest/beans/element/StructureElement.java index 6481c59869af9ba390cee703805627a8b9cdabfa..f9c512b0e149a15eefbb13298de73c210e61c03d 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/StructureElement.java +++ b/src/main/java/org/openepics/names/rest/beans/element/StructureElement.java @@ -59,6 +59,8 @@ public class StructureElement extends StructureElementCommand implements Seriali private Date when; @Schema(description = "Name (user) of who created the structure entry.") private String who; + @Schema(description = "Comment of the structure entry.") + private String comment; /** * Public constructor. @@ -76,7 +78,6 @@ public class StructureElement extends StructureElementCommand implements Seriali * @param mnemonic mnemonic * @param ordering ordering * @param description description - * @param comment comment * @param mnemonicPath mnemonic path * @param level level * @param status status @@ -84,14 +85,15 @@ public class StructureElement extends StructureElementCommand implements Seriali * @param deleted deleted * @param when when * @param who who + * @param comment comment */ public StructureElement( - UUID uuid, Type type, UUID parent, String mnemonic, Integer ordering, - String description, String comment, + UUID uuid, Type type, UUID parent, + String mnemonic, Integer ordering, String description, String mnemonicPath, Integer level, Status status, Boolean latest, Boolean deleted, - Date when, String who) { - super(uuid, type, parent, mnemonic, ordering, description, comment); + Date when, String who, String comment) { + super(uuid, type, parent, mnemonic, ordering, description); this.mnemonicPath = mnemonicPath; this.level = level; this.status = status; @@ -99,6 +101,7 @@ public class StructureElement extends StructureElementCommand implements Seriali this.deleted = deleted; this.when = when; this.who = who; + this.comment = comment; } public String getMnemonicPath() { @@ -143,6 +146,12 @@ public class StructureElement extends StructureElementCommand implements Seriali public void setWho(String who) { this.who = who; } + public String getComment() { + return comment; + } + public void setComment(String comment) { + this.comment = comment; + } @Override public boolean equals(Object obj) { @@ -199,13 +208,18 @@ public class StructureElement extends StructureElementCommand implements Seriali return false; } else if (!getWho().equals(other.getWho())) return false; + if (getComment() == null) { + if (other.getComment() != null) + return false; + } else if (!getComment().equals(other.getComment())) + return false; return true; } @Override public int hashCode() { - return Objects.hash(getUuid(), getWhen()); + return Objects.hash(getUuid(), getWhen(), getComment()); } @Override diff --git a/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommand.java b/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommand.java index e989c61f35565c4ac52189058fbf460d0bb81263..00fe0668755a12642eab2b3efef30dbfb745f9c9 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommand.java +++ b/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommand.java @@ -55,8 +55,6 @@ public class StructureElementCommand implements Serializable { private Integer ordering; @Schema(description = "Description (verbose) of the structure entry.") private String description; - @Schema(description = "Comment of the structure entry command.") - private String comment; /** * Public constructor. @@ -73,12 +71,10 @@ public class StructureElementCommand implements Serializable { * @param mnemonic mnemonic * @param ordering ordering * @param description description - * @param comment comment */ public StructureElementCommand( UUID uuid, Type type, UUID parent, - String mnemonic, Integer ordering, - String description, String comment) { + String mnemonic, Integer ordering, String description) { super(); this.uuid = uuid; this.type = type; @@ -86,7 +82,6 @@ public class StructureElementCommand implements Serializable { this.mnemonic = mnemonic; this.ordering = ordering; this.description = description; - this.comment = comment; } public UUID getUuid() { @@ -125,12 +120,6 @@ public class StructureElementCommand implements Serializable { public void setDescription(String description) { this.description = description; } - public String getComment() { - return comment; - } - public void setComment(String comment) { - this.comment = comment; - } @Override public boolean equals(Object obj) { @@ -178,11 +167,6 @@ public class StructureElementCommand implements Serializable { return false; } else if (!getDescription().equals(other.getDescription())) return false; - if (getComment() == null) { - if (other.getComment() != null) - return false; - } else if (!getComment().equals(other.getComment())) - return false; return true; } @@ -191,7 +175,7 @@ public class StructureElementCommand implements Serializable { public int hashCode() { return Objects.hash( getUuid(), getType(), getParent(), - getMnemonic(), getDescription(), getComment()); + getMnemonic(), getDescription()); } @Override @@ -204,7 +188,6 @@ public class StructureElementCommand implements Serializable { sb.append(", \"mnemonic\": " + getMnemonic()); sb.append(", \"ordering\": " + getOrdering()); sb.append(", \"description\": " + getDescription()); - sb.append(", \"comment\": " + getComment()); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommandConfirm.java b/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommandConfirm.java index d7a2fb92706f05477a5b02769f9a4c018a1c78d8..1bbf7d721bf201c6c7ca738562514cec6e8b0f9a 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommandConfirm.java +++ b/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommandConfirm.java @@ -19,8 +19,6 @@ public class StructureElementCommandConfirm implements Serializable { private UUID uuid; @Schema(description = "Type of the structure entry. Valid values - SYSTEMGROUP, SYSTEM, SUBSYSTEM, DISCIPLINE, DEVICEGROUP, DEVICETYPE.") private Type type; - @Schema(description = "Comment of the structure entry command.") - private String comment; /** * Public constructor. @@ -33,14 +31,12 @@ public class StructureElementCommandConfirm implements Serializable { * * @param uuid uuid * @param type type - * @param comment comment */ public StructureElementCommandConfirm( - UUID uuid, Type type, String comment) { + UUID uuid, Type type) { super(); this.uuid = uuid; this.type = type; - this.comment = comment; } public UUID getUuid() { @@ -55,12 +51,6 @@ public class StructureElementCommandConfirm implements Serializable { public void setType(Type type) { this.type = type; } - public String getComment() { - return comment; - } - public void setComment(String comment) { - this.comment = comment; - } @Override public boolean equals(Object obj) { @@ -88,19 +78,13 @@ public class StructureElementCommandConfirm implements Serializable { return false; } else if (!getType().equals(other.getType())) return false; - if (getComment() == null) { - if (other.getComment() != null) - return false; - } else if (!getComment().equals(other.getComment())) - return false; return true; } @Override public int hashCode() { - return Objects.hash( - getUuid()); + return Objects.hash(getUuid()); } @Override @@ -109,7 +93,6 @@ public class StructureElementCommandConfirm implements Serializable { sb.append("{"); sb.append("\"uuid\": " + getUuid()); sb.append(", \"type\": " + getType()); - sb.append(", \"comment\": " + getComment()); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommandCreate.java b/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommandCreate.java index 4c1acb23f9e1979af233763a62e40638469259af..543d501648dad2812c21f50ca410add922dec4d7 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommandCreate.java +++ b/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommandCreate.java @@ -25,8 +25,6 @@ public class StructureElementCommandCreate implements Serializable { private Integer ordering; @Schema(description = "Description (verbose) of the structure entry.") private String description; - @Schema(description = "Comment of the structure entry command.") - private String comment; /** * Public constructor. @@ -42,19 +40,16 @@ public class StructureElementCommandCreate implements Serializable { * @param mnemonic mnemonic * @param ordering ordering * @param description description - * @param comment comment */ public StructureElementCommandCreate( Type type, UUID parent, - String mnemonic, Integer ordering, - String description, String comment) { + String mnemonic, Integer ordering, String description) { super(); this.type = type; this.parent = parent; this.mnemonic = mnemonic; this.ordering = ordering; this.description = description; - this.comment = comment; } public Type getType() { @@ -87,12 +82,6 @@ public class StructureElementCommandCreate implements Serializable { public void setDescription(String description) { this.description = description; } - public String getComment() { - return comment; - } - public void setComment(String comment) { - this.comment = comment; - } @Override public boolean equals(Object obj) { @@ -135,11 +124,6 @@ public class StructureElementCommandCreate implements Serializable { return false; } else if (!getDescription().equals(other.getDescription())) return false; - if (getComment() == null) { - if (other.getComment() != null) - return false; - } else if (!getComment().equals(other.getComment())) - return false; return true; } @@ -147,7 +131,7 @@ public class StructureElementCommandCreate implements Serializable { @Override public int hashCode() { return Objects.hash( - getType(), getParent(), getMnemonic(), getDescription(), getComment()); + getType(), getParent(), getMnemonic(), getDescription()); } @Override @@ -159,7 +143,6 @@ public class StructureElementCommandCreate implements Serializable { sb.append(", \"mnemonic\": " + getMnemonic()); sb.append(", \"ordering\": " + getOrdering()); sb.append(", \"description\": " + getDescription()); - sb.append(", \"comment\": " + getComment()); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommandUpdate.java b/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommandUpdate.java index 8766d469f7e7bc961129e57611a8b6df3f4b4fb1..4f42a70caa423bc4c084e7bc31724941c6b61206 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommandUpdate.java +++ b/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommandUpdate.java @@ -33,13 +33,11 @@ public class StructureElementCommandUpdate extends StructureElementCommandCreate * @param mnemonic mnemonic * @param ordering ordering * @param description description - * @param comment comment */ public StructureElementCommandUpdate( UUID uuid, Type type, UUID parent, - String mnemonic, Integer ordering, - String description, String comment) { - super(type, parent, mnemonic, ordering, description, comment); + String mnemonic, Integer ordering, String description) { + super(type, parent, mnemonic, ordering, description); this.uuid = uuid; } @@ -94,7 +92,6 @@ public class StructureElementCommandUpdate extends StructureElementCommandCreate sb.append(", \"mnemonic\": " + getMnemonic()); sb.append(", \"ordering\": " + getOrdering()); sb.append(", \"description\": " + getDescription()); - sb.append(", \"comment\": " + getComment()); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/openepics/names/service/DeviceGroupService.java b/src/main/java/org/openepics/names/service/DeviceGroupService.java index ca8c4e0ff09119ebba35cfd7d0d446fc0fbe4e7c..327190aab10e48ca1078cd7203d3fa3478e57176 100644 --- a/src/main/java/org/openepics/names/service/DeviceGroupService.java +++ b/src/main/java/org/openepics/names/service/DeviceGroupService.java @@ -94,7 +94,7 @@ public class DeviceGroupService { // notification // // attributes - // type, parent, mnemonic, ordering, description, comment + // type, parent, mnemonic, ordering, description // note // namingConvention.equivalenceClassRepresentative return null for null input @@ -108,7 +108,7 @@ public class DeviceGroupService { DeviceGroup deviceGroup = new DeviceGroup(UUID.randomUUID(), structureElementCommand.getParent(), mnemonic, equivalenceClassRepresentative, structureElementCommand.getOrdering(), structureElementCommand.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.FALSE, - when, username, structureElementCommand.getComment()); + when, username, null); deviceGroupRepository.createDeviceGroup(deviceGroup); return new StructureElementNotification( @@ -129,7 +129,7 @@ public class DeviceGroupService { // notification // // attributes - // uuid, type, parent, mnemonic, ordering, description, comment + // uuid, type, parent, mnemonic, ordering, description // note // namingConvention.equivalenceClassRepresentative return null for null input @@ -143,7 +143,7 @@ public class DeviceGroupService { DeviceGroup deviceGroup = new DeviceGroup(structureElementCommand.getUuid(), structureElementCommand.getParent(), mnemonic, equivalenceClassRepresentative, structureElementCommand.getOrdering(), structureElementCommand.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.FALSE, - when, username, structureElementCommand.getComment()); + when, username, null); deviceGroupRepository.createDeviceGroup(deviceGroup); // previous @@ -168,7 +168,7 @@ public class DeviceGroupService { // notification // // attributes - // uuid, comment + // uuid // find List<DeviceGroup> deviceGroups = deviceGroupRepository.readDeviceGroups(Status.APPROVED, Boolean.FALSE, structureElementCommand.getUuid().toString(), null, null, null, null, null, null); @@ -181,7 +181,7 @@ public class DeviceGroupService { DeviceGroup deviceGroup = new DeviceGroup(toBeDeleted.getUuid(), toBeDeleted.getParentUuid(), toBeDeleted.getMnemonic(), toBeDeleted.getMnemonicEquivalence(), toBeDeleted.getOrdering(), toBeDeleted.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.TRUE, - when, username, structureElementCommand.getComment()); + when, username, null); deviceGroupRepository.createDeviceGroup(deviceGroup); return new StructureElementNotification( @@ -219,7 +219,7 @@ public class DeviceGroupService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -242,7 +242,7 @@ public class DeviceGroupService { deviceGroup = deviceGroups.get(0); // approve - deviceGroup.setAttributesStatusProcessed(Status.APPROVED, when, username, structureElementCommand.getComment()); + deviceGroup.setAttributesStatusProcessed(Status.APPROVED, when, username, null); deviceGroup.setLatest(Boolean.TRUE); deviceGroupRepository.updateDeviceGroup(deviceGroup); @@ -258,7 +258,7 @@ public class DeviceGroupService { List<StructureElementCommand> commands = Lists.newArrayList(); List<DeviceType> deviceTypes = iDeviceTypeRepository.findLatestNotDeletedByParent(uuid); for (DeviceType deviceType : deviceTypes) { - commands.add(new StructureElementCommand(deviceType.getUuid(), Type.DEVICETYPE, null, null, null, null, StructuresService.DELETE_AFTER_APPROVE_STRUCTURE_CHANGE)); + commands.add(new StructureElementCommand(deviceType.getUuid(), Type.DEVICETYPE, null, null, null, null)); } for (StructureElementCommand command : commands) { deviceTypeService.deleteStructure(command, when, username, holderStructures); @@ -289,7 +289,7 @@ public class DeviceGroupService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -301,7 +301,7 @@ public class DeviceGroupService { DeviceGroup deviceGroup = deviceGroups.get(0); // cancel - deviceGroup.setAttributesStatusProcessed(Status.CANCELLED, when, username, structureElementCommand.getComment()); + deviceGroup.setAttributesStatusProcessed(Status.CANCELLED, when, username, null); deviceGroupRepository.updateDeviceGroup(deviceGroup); // previous @@ -330,7 +330,7 @@ public class DeviceGroupService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -342,7 +342,7 @@ public class DeviceGroupService { DeviceGroup deviceGroup = deviceGroups.get(0); // reject - deviceGroup.setAttributesStatusProcessed(Status.REJECTED, when, username, structureElementCommand.getComment()); + deviceGroup.setAttributesStatusProcessed(Status.REJECTED, when, username, null); deviceGroupRepository.updateDeviceGroup(deviceGroup); // previous diff --git a/src/main/java/org/openepics/names/service/DeviceTypeService.java b/src/main/java/org/openepics/names/service/DeviceTypeService.java index b7b2ee1574fe2d6bd65130076d4455ddb2349401..e12c110d6e21cdef9572f6c7f827189781c33c65 100644 --- a/src/main/java/org/openepics/names/service/DeviceTypeService.java +++ b/src/main/java/org/openepics/names/service/DeviceTypeService.java @@ -87,7 +87,7 @@ public class DeviceTypeService { // notification // // attributes - // type, parent, mnemonic, ordering, description, comment + // type, parent, mnemonic, ordering, description // note // namingConvention.equivalenceClassRepresentative return null for null input @@ -101,7 +101,7 @@ public class DeviceTypeService { DeviceType deviceType = new DeviceType(UUID.randomUUID(), structureElementCommand.getParent(), mnemonic, equivalenceClassRepresentative, structureElementCommand.getOrdering(), structureElementCommand.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.FALSE, - when, username, structureElementCommand.getComment()); + when, username, null); deviceTypeRepository.createDeviceType(deviceType); return new StructureElementNotification( @@ -122,7 +122,7 @@ public class DeviceTypeService { // notification // // attributes - // uuid, type, parent, mnemonic, ordering, description, comment + // uuid, type, parent, mnemonic, ordering, description // note // namingConvention.equivalenceClassRepresentative return null for null input @@ -136,7 +136,7 @@ public class DeviceTypeService { DeviceType deviceType = new DeviceType(structureElementCommand.getUuid(), structureElementCommand.getParent(), mnemonic, equivalenceClassRepresentative, structureElementCommand.getOrdering(), structureElementCommand.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.FALSE, - when, username, structureElementCommand.getComment()); + when, username, null); deviceTypeRepository.createDeviceType(deviceType); // previous @@ -161,7 +161,7 @@ public class DeviceTypeService { // notification // // attributes - // uuid, comment + // uuid // find List<DeviceType> deviceTypes = deviceTypeRepository.readDeviceTypes(Status.APPROVED, Boolean.FALSE, structureElementCommand.getUuid().toString(), null, null, null, null, null, null); @@ -174,7 +174,7 @@ public class DeviceTypeService { DeviceType deviceType = new DeviceType(toBeDeleted.getUuid(), toBeDeleted.getParentUuid(), toBeDeleted.getMnemonic(), toBeDeleted.getMnemonicEquivalence(), toBeDeleted.getOrdering(), toBeDeleted.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.TRUE, - when, username, structureElementCommand.getComment()); + when, username, null); deviceTypeRepository.createDeviceType(deviceType); return new StructureElementNotification( @@ -212,7 +212,7 @@ public class DeviceTypeService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -235,7 +235,7 @@ public class DeviceTypeService { deviceType = deviceTypes.get(0); // approve - deviceType.setAttributesStatusProcessed(Status.APPROVED, when, username, structureElementCommand.getComment()); + deviceType.setAttributesStatusProcessed(Status.APPROVED, when, username, null); deviceType.setLatest(Boolean.TRUE); deviceTypeRepository.updateDeviceType(deviceType); @@ -272,7 +272,7 @@ public class DeviceTypeService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -283,7 +283,7 @@ public class DeviceTypeService { DeviceType deviceType = deviceTypes.get(0); // cancel - deviceType.setAttributesStatusProcessed(Status.CANCELLED, when, username, structureElementCommand.getComment()); + deviceType.setAttributesStatusProcessed(Status.CANCELLED, when, username, null); deviceTypeRepository.updateDeviceType(deviceType); // previous @@ -312,7 +312,7 @@ public class DeviceTypeService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -324,7 +324,7 @@ public class DeviceTypeService { DeviceType deviceType = deviceTypes.get(0); // reject - deviceType.setAttributesStatusProcessed(Status.REJECTED, when, username, structureElementCommand.getComment()); + deviceType.setAttributesStatusProcessed(Status.REJECTED, when, username, null); deviceTypeRepository.updateDeviceType(deviceType); // previous diff --git a/src/main/java/org/openepics/names/service/DisciplineService.java b/src/main/java/org/openepics/names/service/DisciplineService.java index 468060fc548f2e627094c9eac36e301655fbafec..446ee6f57f8d76a5e890ad7dcb47ad707560330b 100644 --- a/src/main/java/org/openepics/names/service/DisciplineService.java +++ b/src/main/java/org/openepics/names/service/DisciplineService.java @@ -97,7 +97,7 @@ public class DisciplineService { // notification // // attributes - // type, parent, mnemonic, ordering, description, comment + // type, parent, mnemonic, ordering, description // note // namingConvention.equivalenceClassRepresentative return null for null input @@ -111,7 +111,7 @@ public class DisciplineService { Discipline discipline = new Discipline(UUID.randomUUID(), mnemonic, equivalenceClassRepresentative, structureElementCommand.getOrdering(), structureElementCommand.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.FALSE, - when, username, structureElementCommand.getComment()); + when, username, null); disciplineRepository.createDiscipline(discipline); return new StructureElementNotification( @@ -132,7 +132,7 @@ public class DisciplineService { // notification // // attributes - // uuid, type, parent, mnemonic, ordering, description, comment + // uuid, type, parent, mnemonic, ordering, description // note // namingConvention.equivalenceClassRepresentative return null for null input @@ -146,7 +146,7 @@ public class DisciplineService { Discipline discipline = new Discipline(structureElementCommand.getUuid(), mnemonic, equivalenceClassRepresentative, structureElementCommand.getOrdering(), structureElementCommand.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.FALSE, - when, username, structureElementCommand.getComment()); + when, username, null); disciplineRepository.createDiscipline(discipline); // previous @@ -171,7 +171,7 @@ public class DisciplineService { // notification // // attributes - // uuid, comment + // uuid // find List<Discipline> disciplines = disciplineRepository.readDisciplines(Status.APPROVED, Boolean.FALSE, structureElementCommand.getUuid().toString(), null, null, null, null, null); @@ -184,7 +184,7 @@ public class DisciplineService { Discipline discipline = new Discipline(toBeDeleted.getUuid(), toBeDeleted.getMnemonic(), toBeDeleted.getMnemonicEquivalence(), toBeDeleted.getOrdering(), toBeDeleted.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.TRUE, - when, username, structureElementCommand.getComment()); + when, username, null); disciplineRepository.createDiscipline(discipline); return new StructureElementNotification( @@ -222,7 +222,7 @@ public class DisciplineService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -244,7 +244,7 @@ public class DisciplineService { discipline = disciplines.get(0); // approve - discipline.setAttributesStatusProcessed(Status.APPROVED, when, username, structureElementCommand.getComment()); + discipline.setAttributesStatusProcessed(Status.APPROVED, when, username, null); discipline.setLatest(Boolean.TRUE); disciplineRepository.updateDiscipline(discipline); @@ -262,7 +262,7 @@ public class DisciplineService { List<StructureElementCommand> commands = Lists.newArrayList(); List<DeviceGroup> deviceGroups = iDeviceGroupRepository.findLatestNotDeletedByParent(uuid); for (DeviceGroup deviceGroup : deviceGroups) { - commands.add(new StructureElementCommand(deviceGroup.getUuid(), Type.DEVICEGROUP, null, null, null, null, StructuresService.DELETE_AFTER_APPROVE_STRUCTURE_CHANGE)); + commands.add(new StructureElementCommand(deviceGroup.getUuid(), Type.DEVICEGROUP, null, null, null, null)); } for (StructureElementCommand command : commands) { deviceGroupService.deleteStructure(command, when, username, holderStructures); @@ -293,7 +293,7 @@ public class DisciplineService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -305,7 +305,7 @@ public class DisciplineService { Discipline discipline = disciplines.get(0); // cancel - discipline.setAttributesStatusProcessed(Status.CANCELLED, when, username, structureElementCommand.getComment()); + discipline.setAttributesStatusProcessed(Status.CANCELLED, when, username, null); disciplineRepository.updateDiscipline(discipline); // previous @@ -334,7 +334,7 @@ public class DisciplineService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -346,7 +346,7 @@ public class DisciplineService { Discipline discipline = disciplines.get(0); // reject - discipline.setAttributesStatusProcessed(Status.REJECTED, when, username, structureElementCommand.getComment()); + discipline.setAttributesStatusProcessed(Status.REJECTED, when, username, null); disciplineRepository.updateDiscipline(discipline); // previous diff --git a/src/main/java/org/openepics/names/service/NamesService.java b/src/main/java/org/openepics/names/service/NamesService.java index ea7d16ba610503d2af24937ccbc95df0f024f965..af5551e39ef632a447a2ef1edd324c327eacb417 100644 --- a/src/main/java/org/openepics/names/service/NamesService.java +++ b/src/main/java/org/openepics/names/service/NamesService.java @@ -93,8 +93,6 @@ public class NamesService { private static final Logger LOGGER = Logger.getLogger(NamesService.class.getName()); - private static final String UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE = "Update after APPROVE structure change"; - private HolderIRepositories holderIRepositories; private HolderRepositories holderRepositories; // convenience, also part of holderRepositories @@ -183,13 +181,13 @@ public class NamesService { // return name element for created name // // attributes - // parentSystemStructure, parentDeviceStructure, index, description, comment + // parentSystemStructure, parentDeviceStructure, index, description UUID parentSystemStructure = nameElementCommand.getParentSystemStructure(); UUID parentDeviceStructure = nameElementCommand.getParentDeviceStructure(); String index = nameElementCommand.getIndex(); String description = nameElementCommand.getDescription(); - String comment = nameElementCommand.getComment(); + String comment = null; // find // system structure - system group, system, subsystem - one of the three expected to be non-null, other two expected to be null @@ -217,8 +215,8 @@ public class NamesService { system != null ? system.getUuid() : null, subsystem != null ? subsystem.getUuid() : null, parentDeviceStructure, - index, derivedName, namingConvention.equivalenceClassRepresentative(derivedName), - description, Status.APPROVED, Boolean.TRUE, Boolean.FALSE, + index, derivedName, namingConvention.equivalenceClassRepresentative(derivedName), description, + Status.APPROVED, Boolean.TRUE, Boolean.FALSE, when, username, comment); nameRepository.createName(name); @@ -621,7 +619,7 @@ public class NamesService { // return name elements for updated names // // attributes - // uuid, parentSystemStructure, parentDeviceStructure, index, description, comment + // uuid, parentSystemStructure, parentDeviceStructure, index, description // initiate holder of system and device structure content, for performance reasons HolderStructures holderStructures = new HolderStructures(holderIRepositories); @@ -637,7 +635,7 @@ public class NamesService { UUID parentDeviceStructure = nameElementCommand.getParentDeviceStructure(); String index = nameElementCommand.getIndex(); String description = nameElementCommand.getDescription(); - String comment = nameElementCommand.getComment(); + String comment = null; Name name = holderIRepositories.nameRepository().findLatestByUuid(uuid.toString()); if (name == null) { @@ -679,8 +677,8 @@ public class NamesService { system != null ? system.getUuid() : null, subsystem != null ? subsystem.getUuid() : null, parentDeviceStructure, - index, derivedName, namingConvention.equivalenceClassRepresentative(derivedName), - description, Status.APPROVED, Boolean.TRUE, Boolean.FALSE, + index, derivedName, namingConvention.equivalenceClassRepresentative(derivedName), description, + Status.APPROVED, Boolean.TRUE, Boolean.FALSE, when, username, comment); nameRepository.createName(name); @@ -730,7 +728,7 @@ public class NamesService { nameElements.add( new NameElementCommand( name.getUuid(), name.getSystemGroupUuid(), name.getDeviceTypeUuid(), - name.getInstanceIndex(), name.getDescription(), UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE)); + name.getInstanceIndex(), name.getDescription())); } } else if (previousStructure instanceof System && structure instanceof System) { // find @@ -740,7 +738,7 @@ public class NamesService { nameElements.add( new NameElementCommand( name.getUuid(), name.getSystemUuid(), name.getDeviceTypeUuid(), - name.getInstanceIndex(), name.getDescription(), UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE)); + name.getInstanceIndex(), name.getDescription())); } names = holderIRepositories.nameRepository().findLatestBySystemUuidThroughSubsystem(structure.getUuid().toString()); @@ -748,7 +746,7 @@ public class NamesService { nameElements.add( new NameElementCommand( name.getUuid(), name.getSubsystemUuid(), name.getDeviceTypeUuid(), - name.getInstanceIndex(), name.getDescription(), UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE)); + name.getInstanceIndex(), name.getDescription())); } } else if (previousStructure instanceof Subsystem && structure instanceof Subsystem) { // find @@ -758,7 +756,7 @@ public class NamesService { nameElements.add( new NameElementCommand( name.getUuid(), name.getSubsystemUuid(), name.getDeviceTypeUuid(), - name.getInstanceIndex(), name.getDescription(), UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE)); + name.getInstanceIndex(), name.getDescription())); } } else if (previousStructure instanceof Discipline && structure instanceof Discipline) { // find @@ -775,7 +773,7 @@ public class NamesService { nameElements.add( new NameElementCommand( name.getUuid(), parentSystemStructure, name.getDeviceTypeUuid(), - name.getInstanceIndex(), name.getDescription(), UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE)); + name.getInstanceIndex(), name.getDescription())); } } else if (previousStructure instanceof DeviceType && structure instanceof DeviceType) { // find @@ -792,7 +790,7 @@ public class NamesService { nameElements.add( new NameElementCommand( name.getUuid(), parentSystemStructure, name.getDeviceTypeUuid(), - name.getInstanceIndex(), name.getDescription(), UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE)); + name.getInstanceIndex(), name.getDescription())); } } @@ -819,13 +817,13 @@ public class NamesService { // return name elements for deleted names // // attributes - // uuid, comment + // uuid Date when = new Date(); final List<NameElement> deletedNameElements = Lists.newArrayList(); for (NameElementCommand nameElementCommand : nameElementCommands) { UUID uuid = nameElementCommand.getUuid(); - String comment = nameElementCommand.getComment(); + String comment = null; Name name = holderIRepositories.nameRepository().findLatestByUuid(uuid.toString()); if (name == null) { @@ -840,8 +838,8 @@ public class NamesService { name.getSystemUuid(), name.getSubsystemUuid(), name.getDeviceTypeUuid(), - name.getInstanceIndex(), name.getConventionName(), name.getConventionNameEquivalence(), - name.getDescription(), Status.APPROVED, Boolean.TRUE, Boolean.TRUE, + name.getInstanceIndex(), name.getConventionName(), name.getConventionNameEquivalence(), name.getDescription(), + Status.APPROVED, Boolean.TRUE, Boolean.TRUE, when, username, comment); nameRepository.createName(name); diff --git a/src/main/java/org/openepics/names/service/StructuresService.java b/src/main/java/org/openepics/names/service/StructuresService.java index 2c027b0c83db166c5a02609eacf80b96bfcf2616..9c51bea288091aa73dd24c183dea7c9365319e73 100644 --- a/src/main/java/org/openepics/names/service/StructuresService.java +++ b/src/main/java/org/openepics/names/service/StructuresService.java @@ -90,7 +90,6 @@ public class StructuresService { private static final Logger LOGGER = Logger.getLogger(StructuresService.class.getName()); protected static final String SYSTEM_STRUCTURE_ONLY = "System structure only"; - protected static final String DELETE_AFTER_APPROVE_STRUCTURE_CHANGE = "Delete after APPROVE structure change"; private HolderIRepositories holderIRepositories; private HolderRepositories holderRepositories; diff --git a/src/main/java/org/openepics/names/service/SubsystemService.java b/src/main/java/org/openepics/names/service/SubsystemService.java index 475078e9417c624da16c5d63ecf24ca5f3d9b7ea..87363b3184374e318bc20ca6ffc576c17c49472f 100644 --- a/src/main/java/org/openepics/names/service/SubsystemService.java +++ b/src/main/java/org/openepics/names/service/SubsystemService.java @@ -88,7 +88,7 @@ public class SubsystemService { // notification // // attributes - // type, parent, mnemonic, ordering, description, comment + // type, parent, mnemonic, ordering, description // note // namingConvention.equivalenceClassRepresentative return null for null input @@ -102,7 +102,7 @@ public class SubsystemService { Subsystem subsystem = new Subsystem(UUID.randomUUID(), structureElementCommand.getParent(), mnemonic, equivalenceClassRepresentative, structureElementCommand.getOrdering(), structureElementCommand.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.FALSE, - when, username, structureElementCommand.getComment()); + when, username, null); subsystemRepository.createSubsystem(subsystem); return new StructureElementNotification( @@ -123,7 +123,7 @@ public class SubsystemService { // notification // // attributes - // uuid, type, parent, mnemonic, ordering, description, comment + // uuid, type, parent, mnemonic, ordering, description // note // namingConvention.equivalenceClassRepresentative return null for null input @@ -137,7 +137,7 @@ public class SubsystemService { Subsystem subsystem = new Subsystem(structureElementCommand.getUuid(), structureElementCommand.getParent(), mnemonic, equivalenceClassRepresentative, structureElementCommand.getOrdering(), structureElementCommand.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.FALSE, - when, username, structureElementCommand.getComment()); + when, username, null); subsystemRepository.createSubsystem(subsystem); // previous @@ -162,7 +162,7 @@ public class SubsystemService { // notification // // attributes - // uuid, comment + // uuid // find List<Subsystem> subsystems = subsystemRepository.readSubsystems(Status.APPROVED, Boolean.FALSE, structureElementCommand.getUuid().toString(), null, null, null, null, null, null); @@ -175,7 +175,7 @@ public class SubsystemService { Subsystem subsystem = new Subsystem(toBeDeleted.getUuid(), toBeDeleted.getParentUuid(), toBeDeleted.getMnemonic(), toBeDeleted.getMnemonicEquivalence(), toBeDeleted.getOrdering(), toBeDeleted.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.TRUE, - when, username, structureElementCommand.getComment()); + when, username, null); subsystemRepository.createSubsystem(subsystem); return new StructureElementNotification( @@ -213,7 +213,7 @@ public class SubsystemService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -236,7 +236,7 @@ public class SubsystemService { subsystem = subsystems.get(0); // approve - subsystem.setAttributesStatusProcessed(Status.APPROVED, when, username, structureElementCommand.getComment()); + subsystem.setAttributesStatusProcessed(Status.APPROVED, when, username, null); subsystem.setLatest(Boolean.TRUE); subsystemRepository.updateSubsystem(subsystem); @@ -250,7 +250,7 @@ public class SubsystemService { boolean hasMnemonic = !StringUtils.isEmpty(subsystem.getMnemonic()); boolean existsName = hasMnemonic && namesService.existsName(StructureUtil.getMnemonicPath(subsystem, holderStructures)); if (hasMnemonic && !existsName) { - NameElementCommand nameElement = new NameElementCommand(null, subsystem.getUuid(), null, null, StructuresService.SYSTEM_STRUCTURE_ONLY, null); + NameElementCommand nameElement = new NameElementCommand(null, subsystem.getUuid(), null, null, StructuresService.SYSTEM_STRUCTURE_ONLY); namesService.createName(nameElement, when, username, holderStructures); } } else if (StructureCommand.UPDATE.equals(structureCommandCUD)) { @@ -280,7 +280,7 @@ public class SubsystemService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -292,7 +292,7 @@ public class SubsystemService { Subsystem subsystem = subsystems.get(0); // cancel - subsystem.setAttributesStatusProcessed(Status.CANCELLED, when, username, structureElementCommand.getComment()); + subsystem.setAttributesStatusProcessed(Status.CANCELLED, when, username, null); subsystemRepository.updateSubsystem(subsystem); // previous @@ -321,7 +321,7 @@ public class SubsystemService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -333,7 +333,7 @@ public class SubsystemService { Subsystem subsystem = subsystems.get(0); // reject - subsystem.setAttributesStatusProcessed(Status.REJECTED, when, username, structureElementCommand.getComment()); + subsystem.setAttributesStatusProcessed(Status.REJECTED, when, username, null); subsystemRepository.updateSubsystem(subsystem); // previous diff --git a/src/main/java/org/openepics/names/service/SystemGroupService.java b/src/main/java/org/openepics/names/service/SystemGroupService.java index 54cf4fce5121aeda23025c00d1e592dc3833277f..41de569e92202bca9bb48bc621a902d904091b70 100644 --- a/src/main/java/org/openepics/names/service/SystemGroupService.java +++ b/src/main/java/org/openepics/names/service/SystemGroupService.java @@ -98,7 +98,7 @@ public class SystemGroupService { // notification // // attributes - // type, parent, mnemonic, ordering, description, comment + // type, parent, mnemonic, ordering, description // note // namingConvention.equivalenceClassRepresentative return null for null input @@ -112,7 +112,7 @@ public class SystemGroupService { SystemGroup systemGroup = new SystemGroup(UUID.randomUUID(), mnemonic, equivalenceClassRepresentative, structureElementCommand.getOrdering(), structureElementCommand.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.FALSE, - when, username, structureElementCommand.getComment()); + when, username, null); systemGroupRepository.createSystemGroup(systemGroup); return new StructureElementNotification( @@ -133,7 +133,7 @@ public class SystemGroupService { // notification // // attributes - // uuid, type, parent, mnemonic, ordering, description, comment + // uuid, type, parent, mnemonic, ordering, description // note // namingConvention.equivalenceClassRepresentative return null for null input @@ -147,7 +147,7 @@ public class SystemGroupService { SystemGroup systemGroup = new SystemGroup(structureElementCommand.getUuid(), mnemonic, equivalenceClassRepresentative, structureElementCommand.getOrdering(), structureElementCommand.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.FALSE, - when, username, structureElementCommand.getComment()); + when, username, null); systemGroupRepository.createSystemGroup(systemGroup); // previous @@ -172,7 +172,7 @@ public class SystemGroupService { // notification // // attributes - // uuid, comment + // uuid // find List<SystemGroup> systemGroups = systemGroupRepository.readSystemGroups(Status.APPROVED, Boolean.FALSE, structureElementCommand.getUuid().toString(), null, null, null, null, null); @@ -185,7 +185,7 @@ public class SystemGroupService { SystemGroup systemGroup = new SystemGroup(toBeDeleted.getUuid(), toBeDeleted.getMnemonic(), toBeDeleted.getMnemonicEquivalence(), toBeDeleted.getOrdering(), toBeDeleted.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.TRUE, - when, username, structureElementCommand.getComment()); + when, username, null); systemGroupRepository.createSystemGroup(systemGroup); return new StructureElementNotification( @@ -223,7 +223,7 @@ public class SystemGroupService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -246,7 +246,7 @@ public class SystemGroupService { systemGroup = systemGroups.get(0); // approve - systemGroup.setAttributesStatusProcessed(Status.APPROVED, when, username, structureElementCommand.getComment()); + systemGroup.setAttributesStatusProcessed(Status.APPROVED, when, username, null); systemGroup.setLatest(Boolean.TRUE); systemGroupRepository.updateSystemGroup(systemGroup); @@ -260,7 +260,7 @@ public class SystemGroupService { boolean hasMnemonic = !StringUtils.isEmpty(systemGroup.getMnemonic()); boolean existsName = hasMnemonic && namesService.existsName(StructureUtil.getMnemonicPath(systemGroup, holderStructures)); if (hasMnemonic && !existsName) { - NameElementCommand nameElement = new NameElementCommand(null, systemGroup.getUuid(), null, null, StructuresService.SYSTEM_STRUCTURE_ONLY, null); + NameElementCommand nameElement = new NameElementCommand(null, systemGroup.getUuid(), null, null, StructuresService.SYSTEM_STRUCTURE_ONLY); namesService.createName(nameElement, when, username, holderStructures); } } else if (StructureCommand.UPDATE.equals(structureCommandCUD)) { @@ -271,7 +271,7 @@ public class SystemGroupService { List<StructureElementCommand> commands = Lists.newArrayList(); List<System> systems = iSystemRepository.findLatestNotDeletedByParent(uuid); for (System system : systems) { - commands.add(new StructureElementCommand(system.getUuid(), Type.SYSTEM, null, null, null, null, StructuresService.DELETE_AFTER_APPROVE_STRUCTURE_CHANGE)); + commands.add(new StructureElementCommand(system.getUuid(), Type.SYSTEM, null, null, null, null)); } for (StructureElementCommand command : commands) { systemService.deleteStructure(command, when, username, holderStructures); @@ -302,7 +302,7 @@ public class SystemGroupService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -314,7 +314,7 @@ public class SystemGroupService { SystemGroup systemGroup = systemGroups.get(0); // cancel - systemGroup.setAttributesStatusProcessed(Status.CANCELLED, when, username, structureElementCommand.getComment()); + systemGroup.setAttributesStatusProcessed(Status.CANCELLED, when, username, null); systemGroupRepository.updateSystemGroup(systemGroup); // previous @@ -343,7 +343,7 @@ public class SystemGroupService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -355,7 +355,7 @@ public class SystemGroupService { SystemGroup systemGroup = systemGroups.get(0); // reject - systemGroup.setAttributesStatusProcessed(Status.REJECTED, when, username, structureElementCommand.getComment()); + systemGroup.setAttributesStatusProcessed(Status.REJECTED, when, username, null); systemGroupRepository.updateSystemGroup(systemGroup); // previous diff --git a/src/main/java/org/openepics/names/service/SystemService.java b/src/main/java/org/openepics/names/service/SystemService.java index eecb9a11883d00d03d22bd4b3c9ec0ab5a2256e6..1baeed0dc3cdaae6efc74e7f406926aa14f75984 100644 --- a/src/main/java/org/openepics/names/service/SystemService.java +++ b/src/main/java/org/openepics/names/service/SystemService.java @@ -98,7 +98,7 @@ public class SystemService { // notification // // attributes - // type, parent, mnemonic, ordering, description, comment + // type, parent, mnemonic, ordering, description // note // namingConvention.equivalenceClassRepresentative return null for null input @@ -112,7 +112,7 @@ public class SystemService { System system = new System(UUID.randomUUID(), structureElementCommand.getParent(), mnemonic, equivalenceClassRepresentative, structureElementCommand.getOrdering(), structureElementCommand.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.FALSE, - when, username, structureElementCommand.getComment()); + when, username, null); systemRepository.createSystem(system); return new StructureElementNotification( @@ -133,7 +133,7 @@ public class SystemService { // notification // // attributes - // uuid, type, parent, mnemonic, ordering, description, comment + // uuid, type, parent, mnemonic, ordering, description // note // namingConvention.equivalenceClassRepresentative return null for null input @@ -147,7 +147,7 @@ public class SystemService { System system = new System(structureElementCommand.getUuid(), structureElementCommand.getParent(), mnemonic, equivalenceClassRepresentative, structureElementCommand.getOrdering(), structureElementCommand.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.FALSE, - when, username, structureElementCommand.getComment()); + when, username, null); systemRepository.createSystem(system); // previous @@ -172,7 +172,7 @@ public class SystemService { // notification // // attributes - // uuid, comment + // uuid // find List<System> systems = systemRepository.readSystems(Status.APPROVED, Boolean.FALSE, structureElementCommand.getUuid().toString(), null, null, null, null, null, null); @@ -185,7 +185,7 @@ public class SystemService { System system = new System(toBeDeleted.getUuid(), toBeDeleted.getParentUuid(), toBeDeleted.getMnemonic(), toBeDeleted.getMnemonicEquivalence(), toBeDeleted.getOrdering(), toBeDeleted.getDescription(), Status.PENDING, Boolean.FALSE, Boolean.TRUE, - when, username, structureElementCommand.getComment()); + when, username, null); systemRepository.createSystem(system); return new StructureElementNotification( @@ -223,7 +223,7 @@ public class SystemService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -246,7 +246,7 @@ public class SystemService { system = systems.get(0); // approve - system.setAttributesStatusProcessed(Status.APPROVED, when, username, structureElementCommand.getComment()); + system.setAttributesStatusProcessed(Status.APPROVED, when, username, null); system.setLatest(Boolean.TRUE); systemRepository.updateSystem(system); @@ -260,7 +260,7 @@ public class SystemService { boolean hasMnemonic = !StringUtils.isEmpty(system.getMnemonic()); boolean existsName = hasMnemonic && namesService.existsName(StructureUtil.getMnemonicPath(system, holderStructures)); if (hasMnemonic && !existsName) { - NameElementCommand nameElement = new NameElementCommand(null, system.getUuid(), null, null, StructuresService.SYSTEM_STRUCTURE_ONLY, null); + NameElementCommand nameElement = new NameElementCommand(null, system.getUuid(), null, null, StructuresService.SYSTEM_STRUCTURE_ONLY); namesService.createName(nameElement, when, username, holderStructures); } } else if (StructureCommand.UPDATE.equals(structureCommandCUD)) { @@ -271,7 +271,7 @@ public class SystemService { List<StructureElementCommand> commands = Lists.newArrayList(); List<Subsystem> subsystems = iSubsystemRepository.findLatestNotDeletedByParent(uuid); for (Subsystem subsystem : subsystems) { - commands.add(new StructureElementCommand(subsystem.getUuid(), Type.SUBSYSTEM, null, null, null, null, StructuresService.DELETE_AFTER_APPROVE_STRUCTURE_CHANGE)); + commands.add(new StructureElementCommand(subsystem.getUuid(), Type.SUBSYSTEM, null, null, null, null)); } for (StructureElementCommand command : commands) { subsystemService.deleteStructure(command, when, username, holderStructures); @@ -302,7 +302,7 @@ public class SystemService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -314,7 +314,7 @@ public class SystemService { System system = systems.get(0); // cancel - system.setAttributesStatusProcessed(Status.CANCELLED, when, username, structureElementCommand.getComment()); + system.setAttributesStatusProcessed(Status.CANCELLED, when, username, null); systemRepository.updateSystem(system); // previous @@ -343,7 +343,7 @@ public class SystemService { // notification // // attributes - // uuid, comment + // uuid String uuid = structureElementCommand.getUuid().toString(); @@ -355,7 +355,7 @@ public class SystemService { System system = systems.get(0); // reject - system.setAttributesStatusProcessed(Status.REJECTED, when, username, structureElementCommand.getComment()); + system.setAttributesStatusProcessed(Status.REJECTED, when, username, null); systemRepository.updateSystem(system); // previous diff --git a/src/main/java/org/openepics/names/util/ExcelUtil.java b/src/main/java/org/openepics/names/util/ExcelUtil.java index 4cfb4794eae73292f82b971e0edb1555a9c6da1a..aa6765b0fc2f9769d646823b29ab1b3e33a02ee3 100644 --- a/src/main/java/org/openepics/names/util/ExcelUtil.java +++ b/src/main/java/org/openepics/names/util/ExcelUtil.java @@ -70,14 +70,13 @@ public class ExcelUtil { // column width 3.44 inch (to fit header text and uuid) private static final int SHEET_COLUMN_WIDTH = 35 * 256 + 64; - private static final int NAMEELEMENTCOMMAND_LENGTH = 6; + private static final int NAMEELEMENTCOMMAND_LENGTH = 5; private static final String[][] NAMEELEMENT_HEADER_COMMENT = { {"Uuid", "Identity (uuid) of the name entry. Value is created server-side."}, {"ParentSystemStructure", "Identity (uuid) for the system structure parent."}, {"ParentDeviceStructure", "Identity (uuid) for the device structure parent (if the name entry refers to device structure)."}, {"Index", "Index (instance) of the name entry (if the name entry refers to device structure)."}, {"Description", "Description (verbose) of the name entry."}, - {"Comment", "Comment of the name entry command."}, // above NameElementCommand {"SystemStructure", "Mnemonic path for for the system structure."}, {"DeviceStructure", "Mnemonic path for for the device structure."}, @@ -86,9 +85,10 @@ public class ExcelUtil { {"Latest", "If the name entry is latest (with status APPROVED) in its line of entries."}, {"Deleted", "If the name entry is deleted."}, {"When", "Date and time when the name entry was created."}, - {"Who", "Name (user) of who created the name entry."} }; + {"Who", "Name (user) of who created the name entry."}, + {"Comment", "Comment of the name entry command."} }; - private static final int STRUCTUREELEMENTCOMMAND_LENGTH = 7; + private static final int STRUCTUREELEMENTCOMMAND_LENGTH = 6; private static final String[][] STRUCTUREELEMENT_HEADER_COMMENT = { {"Uuid", "Identity (uuid) of the structure entry. Value is created server-side."}, {"Type", "Type of the structure entry. Valid values - SYSTEMGROUP, SYSTEM, SUBSYSTEM, DISCIPLINE, DEVICEGROUP, DEVICETYPE."}, @@ -96,7 +96,6 @@ public class ExcelUtil { {"Mnemonic", "Mnemonic of the structure entry."}, {"Ordering", "Ordering of the structure entry."}, {"Description", "Description (verbose) of the structure entry."}, - {"Comment", "Comment of the structure entry command."}, // above StructureElementCommand {"MnemonicPath", "Mnemonic path of the structure entry."}, {"Level", "Level of the structure entry."}, @@ -104,7 +103,8 @@ public class ExcelUtil { {"Latest", "If the structure entry is latest (with status APPROVED) in its line of entries."}, {"Deleted", "If the structure entry is deleted."}, {"When", "Date and time when the structure entry was created."}, - {"Who", "Name (user) of who created the structure entry."} }; + {"Who", "Name (user) of who created the structure entry."}, + {"Comment", "Comment of the structure entry command."} }; private static final String ARIAL = "Arial"; private static final String SHEET = "Entries"; @@ -147,9 +147,9 @@ public class ExcelUtil { // see validateHeaderNameElementCommand // NameElementCommand - // create - parentSystemStructure, parentDeviceStructure, index, description, comment - // update - uuid, parentSystemStructure, parentDeviceStructure, index, description, comment - // delete - uuid, comment + // create - parentSystemStructure, parentDeviceStructure, index, description + // update - uuid, parentSystemStructure, parentDeviceStructure, index, description + // delete - uuid int rowIndex = 0; int columnIndex = 0; @@ -198,9 +198,6 @@ public class ExcelUtil { case 4: nameElementCommand.setDescription(value); break; - case 5: - nameElementCommand.setComment(value); - break; default: if (columnIndex > NAMEELEMENT_HEADER_COMMENT.length - 1) { throw new IllegalArgumentException( @@ -249,9 +246,9 @@ public class ExcelUtil { // see validateHeaderStructureElementCommand // StructureElementCommand - // create - type, parent, mnemonic, ordering, description, comment - // update - uuid, type, parent, mnemonic, ordering, description, comment - // delete - uuid, type comment + // create - type, parent, mnemonic, ordering, description + // update - uuid, type, parent, mnemonic, ordering, description + // delete - uuid, type int rowIndex = 0; int columnIndex = 0; @@ -303,9 +300,6 @@ public class ExcelUtil { case 5: structureElementCommand.setDescription(value); break; - case 6: - structureElementCommand.setComment(value); - break; default: if (columnIndex > STRUCTUREELEMENT_HEADER_COMMENT.length - 1) { throw new IllegalArgumentException( @@ -486,31 +480,31 @@ public class ExcelUtil { cell.setCellValue(nameElement.getDescription()); break; case 5: - cell.setCellValue(nameElement.getComment()); + cell.setCellValue(nameElement.getSystemStructure()); break; case 6: - cell.setCellValue(nameElement.getSystemStructure()); + cell.setCellValue(nameElement.getDeviceStructure()); break; case 7: - cell.setCellValue(nameElement.getDeviceStructure()); + cell.setCellValue(nameElement.getName()); break; case 8: - cell.setCellValue(nameElement.getName()); + cell.setCellValue(nameElement.getStatus() != null ? nameElement.getStatus().toString() : null); break; case 9: - cell.setCellValue(nameElement.getStatus() != null ? nameElement.getStatus().toString() : null); + cell.setCellValue(nameElement.isLatest()); break; case 10: - cell.setCellValue(nameElement.isLatest()); + cell.setCellValue(nameElement.isDeleted()); break; case 11: - cell.setCellValue(nameElement.isDeleted()); + cell.setCellValue(DateFormat.getDateTimeInstance().format(nameElement.getWhen())); break; case 12: - cell.setCellValue(DateFormat.getDateTimeInstance().format(nameElement.getWhen())); + cell.setCellValue(nameElement.getWho()); break; case 13: - cell.setCellValue(nameElement.getWho()); + cell.setCellValue(nameElement.getComment()); break; default: break; @@ -616,28 +610,28 @@ public class ExcelUtil { cell.setCellValue(structureElement.getDescription()); break; case 6: - cell.setCellValue(structureElement.getComment()); + cell.setCellValue(structureElement.getMnemonicPath()); break; case 7: - cell.setCellValue(structureElement.getMnemonicPath()); + cell.setCellValue(structureElement.getLevel()); break; case 8: - cell.setCellValue(structureElement.getLevel()); + cell.setCellValue(structureElement.getStatus() != null ? structureElement.getStatus().toString() : null); break; case 9: - cell.setCellValue(structureElement.getStatus() != null ? structureElement.getStatus().toString() : null); + cell.setCellValue(structureElement.isLatest()); break; case 10: - cell.setCellValue(structureElement.isLatest()); + cell.setCellValue(structureElement.isDeleted()); break; case 11: - cell.setCellValue(structureElement.isDeleted()); + cell.setCellValue(DateFormat.getDateTimeInstance().format(structureElement.getWhen())); break; case 12: - cell.setCellValue(DateFormat.getDateTimeInstance().format(structureElement.getWhen())); + cell.setCellValue(structureElement.getWho()); break; case 13: - cell.setCellValue(structureElement.getWho()); + cell.setCellValue(structureElement.getComment()); break; default: break; diff --git a/src/main/java/org/openepics/names/util/NameElementUtil.java b/src/main/java/org/openepics/names/util/NameElementUtil.java index 502f6b9913f4e746125e06bfb45a69cb741f8fc4..4d0948bde428fc40b5d33b8f7f5634c26342e69d 100644 --- a/src/main/java/org/openepics/names/util/NameElementUtil.java +++ b/src/main/java/org/openepics/names/util/NameElementUtil.java @@ -92,12 +92,12 @@ public class NameElementUtil { : null; return getNameElement( - name.getUuid(), - parentSystemStructure, name.getDeviceTypeUuid(), + name.getUuid(), parentSystemStructure, name.getDeviceTypeUuid(), + name.getInstanceIndex(), name.getDescription(), NamingConventionUtil.extractMnemonicPathSystemStructure(name.getConventionName()), NamingConventionUtil.extractMnemonicPathDeviceStructure(name.getConventionName()), - name.getInstanceIndex(), name.getConventionName(), - name.getDescription(), Status.APPROVED, name.isLatest(), name.isDeleted(), + name.getConventionName(), + Status.APPROVED, name.isLatest(), name.isDeleted(), name.getRequested(), name.getRequestedBy(), name.getRequestedComment()); } @@ -107,11 +107,11 @@ public class NameElementUtil { * @param uuid uuid * @param parentSystemStructure parent system structure uuid (system group, system, subsystem) * @param parentDeviceStructure parent device structure uuid (device type) + * @param index instance index + * @param description description * @param systemStructure system structure mnemonic path * @param deviceStructure device structure mnemonic path - * @param index instance index * @param name name - * @param description description * @param status status * @param latest latest * @param deleted deleted @@ -121,19 +121,18 @@ public class NameElementUtil { * @return name element */ protected static NameElement getNameElement( - UUID uuid, - UUID parentSystemStructure, UUID parentDeviceStructure, - String systemStructure, String deviceStructure, - String index, String name, - String description, Status status, Boolean latest, Boolean deleted, + UUID uuid, UUID parentSystemStructure, UUID parentDeviceStructure, + String index, String description, + String systemStructure, String deviceStructure, String name, + Status status, Boolean latest, Boolean deleted, Date when, String who, String comment) { return new NameElement( - uuid, parentSystemStructure, parentDeviceStructure, index, - description, comment, + uuid, parentSystemStructure, parentDeviceStructure, + index, description, systemStructure, deviceStructure, name, status, latest, deleted, - when, who); + when, who, comment); } /** @@ -157,7 +156,6 @@ public class NameElementUtil { // parentDeviceStructure // index // description - // comment // Name // x systemgroup_uuid // x system_uuid @@ -203,7 +201,6 @@ public class NameElementUtil { return false; } else if (!nameElement.getDescription().equals(name.getDescription())) return false; - // no need to compare comment, it is comment to action that is taken, not considered state return true; } @@ -222,8 +219,7 @@ public class NameElementUtil { command.getParentSystemStructure(), command.getParentDeviceStructure(), command.getIndex(), - command.getDescription(), - command.getComment()); + command.getDescription()); } /** @@ -252,8 +248,7 @@ public class NameElementUtil { command.getParentSystemStructure(), command.getParentDeviceStructure(), command.getIndex(), - command.getDescription(), - command.getComment()); + command.getDescription()); } /** @@ -282,8 +277,7 @@ public class NameElementUtil { null, null, null, - null, - command.getComment()); + null); } /** @@ -313,8 +307,7 @@ public class NameElementUtil { command.getParentSystemStructure(), command.getParentDeviceStructure(), command.getIndex(), - command.getDescription(), - command.getComment()); + command.getDescription()); } /** @@ -343,8 +336,7 @@ public class NameElementUtil { command.getParentSystemStructure(), command.getParentDeviceStructure(), command.getIndex(), - command.getDescription(), - command.getComment()); + command.getDescription()); } /** @@ -369,8 +361,7 @@ public class NameElementUtil { */ public static NameElementCommandConfirm convertCommand2CommandConfirm(NameElementCommand command) { return new NameElementCommandConfirm( - command.getUuid(), - command.getComment()); + command.getUuid()); } /** @@ -400,8 +391,7 @@ public class NameElementUtil { element.getParentSystemStructure(), element.getParentDeviceStructure(), element.getIndex(), - element.getDescription(), - element.getComment()); + element.getDescription()); } /** @@ -430,8 +420,7 @@ public class NameElementUtil { element.getParentSystemStructure(), element.getParentDeviceStructure(), element.getIndex(), - element.getDescription(), - element.getComment()); + element.getDescription()); } /** @@ -456,8 +445,7 @@ public class NameElementUtil { */ public static NameElementCommandConfirm convertElement2CommandConfirm(NameElement element) { return new NameElementCommandConfirm( - element.getUuid(), - element.getComment()); + element.getUuid()); } /** diff --git a/src/main/java/org/openepics/names/util/StructureElementUtil.java b/src/main/java/org/openepics/names/util/StructureElementUtil.java index 4d7db60d82a0d6c90437ef1878c9e1dc82e2855d..8fe20cb65288b336460c5f611e8f9ebdee11ada5 100644 --- a/src/main/java/org/openepics/names/util/StructureElementUtil.java +++ b/src/main/java/org/openepics/names/util/StructureElementUtil.java @@ -282,11 +282,10 @@ public class StructureElementUtil { String mnemonicPath = null; return getStructureElement( - systemGroup.getUuid(), - Type.SYSTEMGROUP, - null, - systemGroup.getMnemonic(), mnemonicPath, systemGroup.getOrdering(), 1, - systemGroup.getDescription(), Status.PENDING, Boolean.FALSE, systemGroup.isDeleted(), + systemGroup.getUuid(), Type.SYSTEMGROUP, null, + systemGroup.getMnemonic(), systemGroup.getOrdering(), systemGroup.getDescription(), + mnemonicPath, 1, + Status.PENDING, Boolean.FALSE, systemGroup.isDeleted(), systemGroup.getRequested(), systemGroup.getRequestedBy(), systemGroup.getRequestedComment()); } /** @@ -311,11 +310,10 @@ public class StructureElementUtil { : StructureUtil.getMnemonicPath(systemGroup, holderStructures); return getStructureElement( - systemGroup.getUuid(), - Type.SYSTEMGROUP, - null, - systemGroup.getMnemonic(), mnemonicPath, systemGroup.getOrdering(), 1, - systemGroup.getDescription(), systemGroup.getStatus(), systemGroup.isLatest(), systemGroup.isDeleted(), + systemGroup.getUuid(), Type.SYSTEMGROUP, null, + systemGroup.getMnemonic(), systemGroup.getOrdering(), systemGroup.getDescription(), + mnemonicPath, 1, + systemGroup.getStatus(), systemGroup.isLatest(), systemGroup.isDeleted(), systemGroup.getProcessed(), systemGroup.getProcessedBy(), systemGroup.getProcessedComment()); } /** @@ -336,11 +334,10 @@ public class StructureElementUtil { String mnemonicPath = null; return getStructureElement( - system.getUuid(), - Type.SYSTEM, - system.getParentUuid(), - system.getMnemonic(), mnemonicPath, system.getOrdering(), 2, - system.getDescription(), Status.PENDING, Boolean.FALSE, system.isDeleted(), + system.getUuid(), Type.SYSTEM, system.getParentUuid(), + system.getMnemonic(), system.getOrdering(), system.getDescription(), + mnemonicPath, 2, + Status.PENDING, Boolean.FALSE, system.isDeleted(), system.getRequested(), system.getRequestedBy(), system.getRequestedComment()); } /** @@ -365,11 +362,10 @@ public class StructureElementUtil { : StructureUtil.getMnemonicPath(system, holderStructures); return getStructureElement( - system.getUuid(), - Type.SYSTEM, - system.getParentUuid(), - system.getMnemonic(), mnemonicPath, system.getOrdering(), 2, - system.getDescription(), system.getStatus(), system.isLatest(), system.isDeleted(), + system.getUuid(), Type.SYSTEM, system.getParentUuid(), + system.getMnemonic(), system.getOrdering(), system.getDescription(), + mnemonicPath, 2, + system.getStatus(), system.isLatest(), system.isDeleted(), system.getProcessed(), system.getProcessedBy(), system.getProcessedComment()); } /** @@ -390,11 +386,10 @@ public class StructureElementUtil { String mnemonicPath = null; return getStructureElement( - subsystem.getUuid(), - Type.SUBSYSTEM, - subsystem.getParentUuid(), - subsystem.getMnemonic(), mnemonicPath, subsystem.getOrdering(), 3, - subsystem.getDescription(), Status.PENDING, Boolean.FALSE, subsystem.isDeleted(), + subsystem.getUuid(), Type.SUBSYSTEM, subsystem.getParentUuid(), + subsystem.getMnemonic(), subsystem.getOrdering(), subsystem.getDescription(), + mnemonicPath, 3, + Status.PENDING, Boolean.FALSE, subsystem.isDeleted(), subsystem.getRequested(), subsystem.getRequestedBy(), subsystem.getRequestedComment()); } /** @@ -419,11 +414,10 @@ public class StructureElementUtil { : StructureUtil.getMnemonicPath(subsystem, holderStructures); return getStructureElement( - subsystem.getUuid(), - Type.SUBSYSTEM, - subsystem.getParentUuid(), - subsystem.getMnemonic(), mnemonicPath, subsystem.getOrdering(), 3, - subsystem.getDescription(), subsystem.getStatus(), subsystem.isLatest(), subsystem.isDeleted(), + subsystem.getUuid(), Type.SUBSYSTEM, subsystem.getParentUuid(), + subsystem.getMnemonic(), subsystem.getOrdering(), subsystem.getDescription(), + mnemonicPath, 3, + subsystem.getStatus(), subsystem.isLatest(), subsystem.isDeleted(), subsystem.getProcessed(), subsystem.getProcessedBy(), subsystem.getProcessedComment()); } @@ -445,11 +439,10 @@ public class StructureElementUtil { String mnemonicPath = null; return getStructureElement( - discipline.getUuid(), - Type.DISCIPLINE, - null, - discipline.getMnemonic(), mnemonicPath, discipline.getOrdering(), 1, - discipline.getDescription(), Status.PENDING, Boolean.FALSE, discipline.isDeleted(), + discipline.getUuid(), Type.DISCIPLINE, null, + discipline.getMnemonic(), discipline.getOrdering(), discipline.getDescription(), + mnemonicPath, 1, + Status.PENDING, Boolean.FALSE, discipline.isDeleted(), discipline.getRequested(), discipline.getRequestedBy(), discipline.getRequestedComment()); } /** @@ -474,11 +467,10 @@ public class StructureElementUtil { : StructureUtil.getMnemonicPath(discipline, holderStructures); return getStructureElement( - discipline.getUuid(), - Type.DISCIPLINE, - null, - discipline.getMnemonic(), mnemonicPath, discipline.getOrdering(), 1, - discipline.getDescription(), discipline.getStatus(), discipline.isLatest(), discipline.isDeleted(), + discipline.getUuid(), Type.DISCIPLINE, null, + discipline.getMnemonic(), discipline.getOrdering(), discipline.getDescription(), + mnemonicPath, 1, + discipline.getStatus(), discipline.isLatest(), discipline.isDeleted(), discipline.getProcessed(), discipline.getProcessedBy(), discipline.getProcessedComment()); } /** @@ -499,11 +491,10 @@ public class StructureElementUtil { String mnemonicPath = null; return getStructureElement( - deviceGroup.getUuid(), - Type.DEVICEGROUP, - deviceGroup.getParentUuid(), - deviceGroup.getMnemonic(), mnemonicPath, deviceGroup.getOrdering(), 2, - deviceGroup.getDescription(), Status.PENDING, Boolean.FALSE, deviceGroup.isDeleted(), + deviceGroup.getUuid(), Type.DEVICEGROUP, deviceGroup.getParentUuid(), + deviceGroup.getMnemonic(), deviceGroup.getOrdering(), deviceGroup.getDescription(), + mnemonicPath, 2, + Status.PENDING, Boolean.FALSE, deviceGroup.isDeleted(), deviceGroup.getRequested(), deviceGroup.getRequestedBy(), deviceGroup.getRequestedComment()); } /** @@ -528,11 +519,10 @@ public class StructureElementUtil { : StructureUtil.getMnemonicPath(deviceGroup, holderStructures); return getStructureElement( - deviceGroup.getUuid(), - Type.DEVICEGROUP, - deviceGroup.getParentUuid(), - deviceGroup.getMnemonic(), mnemonicPath, deviceGroup.getOrdering(), 2, - deviceGroup.getDescription(), deviceGroup.getStatus(), deviceGroup.isLatest(), deviceGroup.isDeleted(), + deviceGroup.getUuid(), Type.DEVICEGROUP, deviceGroup.getParentUuid(), + deviceGroup.getMnemonic(), deviceGroup.getOrdering(), deviceGroup.getDescription(), + mnemonicPath, 2, + deviceGroup.getStatus(), deviceGroup.isLatest(), deviceGroup.isDeleted(), deviceGroup.getProcessed(), deviceGroup.getProcessedBy(), deviceGroup.getProcessedComment()); } /** @@ -553,11 +543,10 @@ public class StructureElementUtil { String mnemonicPath = null; return getStructureElement( - deviceType.getUuid(), - Type.DEVICETYPE, - deviceType.getParentUuid(), - deviceType.getMnemonic(), mnemonicPath, deviceType.getOrdering(), 3, - deviceType.getDescription(), Status.PENDING, Boolean.FALSE, deviceType.isDeleted(), + deviceType.getUuid(), Type.DEVICETYPE, deviceType.getParentUuid(), + deviceType.getMnemonic(), deviceType.getOrdering(), deviceType.getDescription(), + mnemonicPath, 3, + Status.PENDING, Boolean.FALSE, deviceType.isDeleted(), deviceType.getRequested(), deviceType.getRequestedBy(), deviceType.getRequestedComment()); } /** @@ -582,11 +571,10 @@ public class StructureElementUtil { : StructureUtil.getMnemonicPath(deviceType, holderStructures); return getStructureElement( - deviceType.getUuid(), - Type.DEVICETYPE, - deviceType.getParentUuid(), - deviceType.getMnemonic(), mnemonicPath, deviceType.getOrdering(), 3, - deviceType.getDescription(), deviceType.getStatus(), deviceType.isLatest(), deviceType.isDeleted(), + deviceType.getUuid(), Type.DEVICETYPE, deviceType.getParentUuid(), + deviceType.getMnemonic(), deviceType.getOrdering(), deviceType.getDescription(), + mnemonicPath, 3, + deviceType.getStatus(), deviceType.isLatest(), deviceType.isDeleted(), deviceType.getProcessed(), deviceType.getProcessedBy(), deviceType.getProcessedComment()); } @@ -597,10 +585,10 @@ public class StructureElementUtil { * @param type type * @param parent parent uuid * @param mnemonic mnemonic - * @param mnemonicPath mnemonic path * @param ordering ordering - * @param level level * @param description description + * @param mnemonicPath mnemonic path + * @param level level * @param status status * @param latest latest * @param deleted deleted @@ -610,19 +598,18 @@ public class StructureElementUtil { * @return structure element */ protected static StructureElement getStructureElement( - UUID uuid, - Type type, - UUID parent, - String mnemonic, String mnemonicPath, Integer ordering, Integer level, - String description, Status status, Boolean latest, Boolean deleted, + UUID uuid, Type type, UUID parent, + String mnemonic, Integer ordering, String description, + String mnemonicPath, Integer level, + Status status, Boolean latest, Boolean deleted, Date when, String who, String comment) { return new StructureElement( - uuid, type, parent, mnemonic, ordering, - description, comment, + uuid, type, parent, + mnemonic, ordering, description, mnemonicPath, level, status, latest, deleted, - when, who); + when, who, comment); } // ---------------------------------------------------------------------------------------------------- @@ -640,8 +627,7 @@ public class StructureElementUtil { command.getParent(), command.getMnemonic(), command.getOrdering(), - command.getDescription(), - command.getComment()); + command.getDescription()); } /** @@ -671,8 +657,7 @@ public class StructureElementUtil { command.getParent(), command.getMnemonic(), command.getOrdering(), - command.getDescription(), - command.getComment()); + command.getDescription()); } /** @@ -702,8 +687,7 @@ public class StructureElementUtil { null, null, null, - null, - command.getComment()); + null); } /** @@ -734,8 +718,7 @@ public class StructureElementUtil { command.getParent(), command.getMnemonic(), command.getOrdering(), - command.getDescription(), - command.getComment()); + command.getDescription()); } /** @@ -766,8 +749,7 @@ public class StructureElementUtil { command.getParent(), command.getMnemonic(), command.getOrdering(), - command.getDescription(), - command.getComment()); + command.getDescription()); } /** @@ -794,8 +776,7 @@ public class StructureElementUtil { public static StructureElementCommandConfirm convertCommand2CommandConfirm(StructureElementCommand command) { return new StructureElementCommandConfirm( command.getUuid(), - command.getType(), - command.getComment()); + command.getType()); } /** @@ -826,8 +807,7 @@ public class StructureElementUtil { element.getParent(), element.getMnemonic(), element.getOrdering(), - element.getDescription(), - element.getComment()); + element.getDescription()); } /** @@ -857,8 +837,7 @@ public class StructureElementUtil { element.getParent(), element.getMnemonic(), element.getOrdering(), - element.getDescription(), - element.getComment()); + element.getDescription()); } /** @@ -884,8 +863,7 @@ public class StructureElementUtil { public static StructureElementCommandConfirm convertElement2CommandConfirm(StructureElement element) { return new StructureElementCommandConfirm( element.getUuid(), - element.getType(), - element.getComment()); + element.getType()); } /** diff --git a/src/main/java/org/openepics/names/util/TextUtil.java b/src/main/java/org/openepics/names/util/TextUtil.java index 938e3d6d4fd9315a481c36f20201b5f9e2205d99..53fe89df962a9d7439f99c6ee5ef01862f5c3b6f 100644 --- a/src/main/java/org/openepics/names/util/TextUtil.java +++ b/src/main/java/org/openepics/names/util/TextUtil.java @@ -42,7 +42,6 @@ public class TextUtil { public static final String DEVICEGROUP = "device group"; public static final String DEVICETYPE = "device type"; - public static final String COMMENT = "comment"; public static final String DESCRIPTION = "description"; public static final String INDEX = "index"; public static final String MNEMONIC = "mnemonic"; diff --git a/src/main/java/org/openepics/names/util/ValidateNameElementUtil.java b/src/main/java/org/openepics/names/util/ValidateNameElementUtil.java index 200d14d3d9d4b6016cf49a1253467f0ca533132d..248fb6436ff2ee069db73b0e2cbfffeb06e25599 100644 --- a/src/main/java/org/openepics/names/util/ValidateNameElementUtil.java +++ b/src/main/java/org/openepics/names/util/ValidateNameElementUtil.java @@ -46,13 +46,14 @@ public class ValidateNameElementUtil { // NameElement // uuid, // systemGroup, system, subsystem, deviceType, systemStructure, deviceStructure, - // index, name, - // description, status, latest, deleted, when, who, comment + // index, description, name, + // status, latest, deleted, + // when, who, comment // // NameElementCommand - // create - parentSystemStructure, parentDeviceStructure, index, description, comment - // update - uuid, parentSystemStructure, parentDeviceStructure, index, description, comment - // delete - uuid, comment + // create - parentSystemStructure, parentDeviceStructure, index, description + // update - uuid, parentSystemStructure, parentDeviceStructure, index, description + // delete - uuid /** * This class is not to be instantiated. @@ -125,9 +126,9 @@ public class ValidateNameElementUtil { */ private static void validateNameElementInput(NameElementCommand nameElementCommand, NameCommand nameCommand) { // command - attributes - // create - parentSystemStructure, parentDeviceStructure, index, description, comment - // update - uuid, parentSystemStructure, parentDeviceStructure, index, description, comment - // delete - uuid, comment + // create - parentSystemStructure, parentDeviceStructure, index, description + // update - uuid, parentSystemStructure, parentDeviceStructure, index, description + // delete - uuid // // create, update - optional - parentDeviceStructure, index // @@ -145,7 +146,6 @@ public class ValidateNameElementUtil { UUID parentDeviceStructure = nameElementCommand.getParentDeviceStructure(); String index = nameElementCommand.getIndex(); String description = nameElementCommand.getDescription(); - String comment = nameElementCommand.getComment(); if (ValidateUtil.isAnyEqual(nameCommand, NameCommand.UPDATE, NameCommand.DELETE)) { ValidateUtil.validateInputUuid(uuid != null ? uuid.toString() : null); @@ -166,8 +166,6 @@ public class ValidateNameElementUtil { ValidateUtil.validateInputDescription(description); } - - ValidateUtil.validateInputComment(comment); } // ---------------------------------------------------------------------------------------------------- @@ -223,9 +221,9 @@ public class ValidateNameElementUtil { */ private static void validateNameElementData(NameElementCommand nameElementCommand, EssNamingConvention namingConvention, HolderIRepositories holderIRepositories, NameRepository nameRepository, HolderStructures holderStructures, NameCommand nameCommand) { // command - attributes - // create - parentSystemStructure, parentDeviceStructure, index, description, comment - // update - uuid, parentSystemStructure, parentDeviceStructure, index, description, comment - // delete - uuid, comment + // create - parentSystemStructure, parentDeviceStructure, index, description + // update - uuid, parentSystemStructure, parentDeviceStructure, index, description + // delete - uuid // // create, update - optional - parentDeviceStructure, index // @@ -351,7 +349,6 @@ public class ValidateNameElementUtil { } else if (NameCommand.DELETE.equals(nameCommand)) { // n.a. // uuid - already handled - // comment - already handled } } diff --git a/src/main/java/org/openepics/names/util/ValidateStructureElementUtil.java b/src/main/java/org/openepics/names/util/ValidateStructureElementUtil.java index 7a1de4256d488d47d44c04511a9f475138798fa3..3bcea2a6114c93c871ce00c2cb0ce38b20344587 100644 --- a/src/main/java/org/openepics/names/util/ValidateStructureElementUtil.java +++ b/src/main/java/org/openepics/names/util/ValidateStructureElementUtil.java @@ -49,16 +49,18 @@ public class ValidateStructureElementUtil { // // StructureElement // type, uuid, parent, - // mnemonic, mnemonic path, ordering, level, - // description, status, latest, deleted, when, who, comment + // mnemonic, ordering, description, + // mnemonic path, level, + // status, latest, deleted, + // when, who, comment // // StructureElementCommand - // create - type, parent, mnemonic, ordering, description, comment - // update - uuid, type, parent, mnemonic, ordering, description, comment - // delete - uuid, type, comment - // approve - uuid, type, comment - // cancel - uuid, type, comment - // reject - uuid, type, comment + // create - type, parent, mnemonic, ordering, description + // update - uuid, type, parent, mnemonic, ordering, description + // delete - uuid, type + // approve - uuid, type + // cancel - uuid, type + // reject - uuid, type /** * This class is not to be instantiated. @@ -193,12 +195,12 @@ public class ValidateStructureElementUtil { */ private static void validateStructureElementInput(StructureElementCommand structureElementCommand, EssNamingConvention namingConvention, StructureCommand structureCommand) { // command - attributes - // create - type, parent, mnemonic, ordering, description, comment - // update - uuid, type, parent, mnemonic, ordering, description, comment - // delete - uuid, type, comment - // approve - uuid, type, comment - // cancel - uuid, type, comment - // reject - uuid, type, comment + // create - type, parent, mnemonic, ordering, description + // update - uuid, type, parent, mnemonic, ordering, description + // delete - uuid, type + // approve - uuid, type + // cancel - uuid, type + // reject - uuid, type // // create, update - optional - parent, mnemonic // @@ -216,7 +218,6 @@ public class ValidateStructureElementUtil { UUID parent = structureElementCommand.getParent(); String mnemonic = structureElementCommand.getMnemonic(); String description = structureElementCommand.getDescription(); - String comment = structureElementCommand.getComment(); if (ValidateUtil.isAnyEqual(structureCommand, StructureCommand.UPDATE, StructureCommand.DELETE, StructureCommand.APPROVE, StructureCommand.CANCEL, StructureCommand.REJECT)) { ValidateUtil.validateInputUuid(uuid != null ? uuid.toString() : null); @@ -240,8 +241,6 @@ public class ValidateStructureElementUtil { ValidateUtil.validateInputDescription(description); } - - ValidateUtil.validateInputComment(comment); } // ---------------------------------------------------------------------------------------------------- @@ -333,12 +332,12 @@ public class ValidateStructureElementUtil { */ public static void validateStructureElementDataInItself(StructureElementCommand structureElementCommand, HolderRepositories holderRepositories, StructureCommand structureCommand) { // command - attributes - // create - type, parent, mnemonic, ordering, description, comment - // update - uuid, type, parent, mnemonic, ordering, description, comment - // delete - uuid, type, comment - // approve - uuid, type, comment - // cancel - uuid, type, comment - // reject - uuid, type, comment + // create - type, parent, mnemonic, ordering, description + // update - uuid, type, parent, mnemonic, ordering, description + // delete - uuid, type + // approve - uuid, type + // cancel - uuid, type + // reject - uuid, type // // create, update - optional - parent, mnemonic // @@ -432,12 +431,12 @@ public class ValidateStructureElementUtil { */ public static void validateStructureElementDataRelativeOtherData(StructureElementCommand structureElementCommand, EssNamingConvention namingConvention, HolderRepositories holderRepositories, HolderStructures holderStructures, StructureCommand structureCommand) { // command - attributes - // create - type, parent, mnemonic, ordering, description, comment - // update - uuid, type, parent, mnemonic, ordering, description, comment - // delete - uuid, type, comment - // approve - uuid, type, comment - // cancel - uuid, type, comment - // reject - uuid, type, comment + // create - type, parent, mnemonic, ordering, description + // update - uuid, type, parent, mnemonic, ordering, description + // delete - uuid, type + // approve - uuid, type + // cancel - uuid, type + // reject - uuid, type // // create, update - optional - parent, mnemonic // @@ -454,7 +453,6 @@ public class ValidateStructureElementUtil { // checks on mnemonic, mnemonic equivalence are to ensure can coexist, can move // possibly // additional checks if names are affected - // comment not same as previous comment if (ValidateUtil.isAnyNull(structureElementCommand, namingConvention, holderRepositories, holderStructures, structureCommand)) { return; diff --git a/src/main/java/org/openepics/names/util/ValidateUtil.java b/src/main/java/org/openepics/names/util/ValidateUtil.java index 85a746e7a1ac92a657856f027f760d397509a3ba..c56f81fe0341cdb70acfdbe3498027853cf7f656 100644 --- a/src/main/java/org/openepics/names/util/ValidateUtil.java +++ b/src/main/java/org/openepics/names/util/ValidateUtil.java @@ -40,17 +40,6 @@ public class ValidateUtil { throw new IllegalStateException("Utility class"); } - /** - * Validate comment. - * - * @param comment comment - */ - public static void validateInputComment(String comment) { - // available - ExceptionUtil.validateConditionInputNotAvailableException(!StringUtils.isEmpty(comment), - TextUtil.VALUE_IS_NOT_AVAILABLE, comment, TextUtil.COMMENT); - } - /** * Validate description. * diff --git a/src/main/java/org/openepics/names/util/notification/NotificationName.java b/src/main/java/org/openepics/names/util/notification/NotificationName.java index 93b0d671148b1e748bd25e2aea3ba95292d33ae1..46f2bf89df3790f6d2820216d59af9ba805f8978 100644 --- a/src/main/java/org/openepics/names/util/notification/NotificationName.java +++ b/src/main/java/org/openepics/names/util/notification/NotificationName.java @@ -40,7 +40,6 @@ public class NotificationName { private String newIndex; private String newName; private String newDescription; - private String comment; private Date when; private String who; @@ -55,7 +54,6 @@ public class NotificationName { * @param newIndex new index * @param newName new name * @param newDescription new description - * @param comment comment * @param when when * @param who who */ @@ -63,7 +61,7 @@ public class NotificationName { UUID uuid, String oldIndex, String oldName, String oldDescription, String newIndex, String newName, String newDescription, - String comment, Date when, String who) { + Date when, String who) { super(); this.nameCommandCUD = nameCommandCUD; this.uuid = uuid; @@ -73,7 +71,6 @@ public class NotificationName { this.newIndex = newIndex; this.newName = newName; this.newDescription = newDescription; - this.comment = comment; this.when = when; this.who = who; } @@ -102,9 +99,6 @@ public class NotificationName { public String getNewDescription() { return newDescription; } - public String getComment() { - return comment; - } public Date getWhen() { return when; } @@ -124,7 +118,6 @@ public class NotificationName { sb.append(", \"newIndex\": " + getNewIndex()); sb.append(", \"newName\": " + getNewName()); sb.append(", \"newDescription\": " + getNewDescription()); - sb.append(", \"comment\": " + getComment()); sb.append(", \"when\": " + getWhen()); sb.append(", \"who\": " + getWho()); sb.append("}"); diff --git a/src/main/java/org/openepics/names/util/notification/NotificationStructure.java b/src/main/java/org/openepics/names/util/notification/NotificationStructure.java index 6c4d05b9b78437280a7b6a429e0b6e4dddcc2814..a3357a7238002b589821fc165179ed9998c747de 100644 --- a/src/main/java/org/openepics/names/util/notification/NotificationStructure.java +++ b/src/main/java/org/openepics/names/util/notification/NotificationStructure.java @@ -44,7 +44,6 @@ public class NotificationStructure { private String newMnemonic; private String newMnemonicpath; private String newDescription; - private String comment; private Date when; private String who; @@ -61,7 +60,6 @@ public class NotificationStructure { * @param newMnemonic new mnemonic * @param newMnemonicpath new mnemonic path * @param newDescription new description - * @param comment comment * @param when when * @param who who */ @@ -69,7 +67,7 @@ public class NotificationStructure { Type type, UUID uuid, String oldMnemonic, String oldMnemonicpath, String oldDescription, String newMnemonic, String newMnemonicpath, String newDescription, - String comment, Date when, String who) { + Date when, String who) { super(); this.structureCommandCUD = structureCommandCUD; this.structureCommandACR = structureCommandACR; @@ -81,7 +79,6 @@ public class NotificationStructure { this.newMnemonic = newMnemonic; this.newMnemonicpath = newMnemonicpath; this.newDescription = newDescription; - this.comment = comment; this.when = when; this.who = who; } @@ -116,9 +113,6 @@ public class NotificationStructure { public String getNewDescription() { return newDescription; } - public String getComment() { - return comment; - } public Date getWhen() { return when; } @@ -140,7 +134,6 @@ public class NotificationStructure { sb.append(", \"newMnemonic\": " + getNewMnemonic()); sb.append(", \"newMnemonicpath\": " + getNewMnemonicpath()); sb.append(", \"newDescription\": " + getNewDescription()); - sb.append(", \"comment\": " + getComment()); sb.append(", \"when\": " + getWhen()); sb.append(", \"who\": " + getWho()); sb.append("}"); diff --git a/src/main/java/org/openepics/names/util/notification/NotificationUtil.java b/src/main/java/org/openepics/names/util/notification/NotificationUtil.java index ba9798b34ff4a8512401d1c82a2783f851498e6a..b3fdad7aad1e2ffbe4a3c0b94ecd7f68a9f322b8 100644 --- a/src/main/java/org/openepics/names/util/notification/NotificationUtil.java +++ b/src/main/java/org/openepics/names/util/notification/NotificationUtil.java @@ -154,7 +154,6 @@ public class NotificationUtil { newIndex, newName, newDescription, - name.getRequestedComment(), name.getRequested(), name.getRequestedBy()); } @@ -254,21 +253,17 @@ public class NotificationUtil { String newMnemonicpath = EMPTY; String newDescription = EMPTY; - String comment = EMPTY; Date when = null; String who = EMPTY; if (structureCommandACR == null) { - comment = structure.getRequestedComment(); when = structure.getRequested(); who = structure.getRequestedBy(); } else { - comment = structure.getProcessedComment(); when = structure.getProcessed(); who = structure.getProcessedBy(); } - comment = StringUtils.stripToEmpty(comment); who = StringUtils.stripToEmpty(who); if (ValidateUtil.isAnyEqual(structureCommandCUD, StructureCommand.UPDATE)) { @@ -319,7 +314,6 @@ public class NotificationUtil { newMnemonic, newMnemonicpath, newDescription, - comment, when, who); } diff --git a/src/main/resources/templates/notification_names.html b/src/main/resources/templates/notification_names.html index db809bdb2e89553996ac73054522e9b0783b4b14..7958dfc7f85c523e86ce40e0273f02e94f550331 100644 --- a/src/main/resources/templates/notification_names.html +++ b/src/main/resources/templates/notification_names.html @@ -55,7 +55,6 @@ <th/> <th>New</th> - <th>Comment</th> <th>When</th> <th>Who</th> </tr> @@ -80,7 +79,6 @@ </div> </td> - <td th:text="${row.getComment()}"/> <td th:text="${#dates.format(row.getWhen(), 'yyyy.MM.dd HH:mm')}"/> <td th:text="${row.getWho()}"/> </tr> @@ -104,7 +102,6 @@ <th/> <th>New</th> - <th>Comment</th> <th>When</th> <th>Who</th> </tr> @@ -129,7 +126,6 @@ </div> </td> - <td th:text="${row.getComment()}"/> <td th:text="${#dates.format(row.getWhen(), 'yyyy.MM.dd HH:mm')}"/> <td th:text="${row.getWho()}"/> </tr> @@ -153,7 +149,6 @@ <th/> <th>New</th> - <th>Comment</th> <th>When</th> <th>Who</th> </tr> @@ -178,7 +173,6 @@ </div> </td> - <td th:text="${row.getComment()}"/> <td th:text="${#dates.format(row.getWhen(), 'yyyy.MM.dd HH:mm')}"/> <td th:text="${row.getWho()}"/> </tr> diff --git a/src/main/resources/templates/notification_structures.html b/src/main/resources/templates/notification_structures.html index 0e74bc79fa590b52cb68de4b49c164d0d555503b..3b6d4cc345a8859fee4b5cddc1f3714eac134ae5 100644 --- a/src/main/resources/templates/notification_structures.html +++ b/src/main/resources/templates/notification_structures.html @@ -73,7 +73,6 @@ <th/> <th>New</th> - <th>Comment</th> <th>When</th> <th>Who</th> </tr> @@ -100,7 +99,6 @@ </div> </td> - <td th:text="${row.getComment()}"/> <td th:text="${#dates.format(row.getWhen(), 'yyyy.MM.dd HH:mm')}"/> <td th:text="${row.getWho()}"/> </tr> @@ -126,7 +124,6 @@ <th/> <th>New</th> - <th>Comment</th> <th>When</th> <th>Who</th> </tr> @@ -153,7 +150,6 @@ </div> </td> - <td th:text="${row.getComment()}"/> <td th:text="${#dates.format(row.getWhen(), 'yyyy.MM.dd HH:mm')}"/> <td th:text="${row.getWho()}"/> </tr> @@ -179,7 +175,6 @@ <th/> <th>New</th> - <th>Comment</th> <th>When</th> <th>Who</th> </tr> @@ -206,7 +201,6 @@ </div> </td> - <td th:text="${row.getComment()}"/> <td th:text="${#dates.format(row.getWhen(), 'yyyy.MM.dd HH:mm')}"/> <td th:text="${row.getWho()}"/> </tr> @@ -232,7 +226,6 @@ <th/> <th>New</th> - <th>Comment</th> <th>When</th> <th>Who</th> </tr> @@ -259,7 +252,6 @@ </div> </td> - <td th:text="${row.getComment()}"/> <td th:text="${#dates.format(row.getWhen(), 'yyyy.MM.dd HH:mm')}"/> <td th:text="${row.getWho()}"/> </tr> @@ -285,7 +277,6 @@ <th/> <th>New</th> - <th>Comment</th> <th>When</th> <th>Who</th> </tr> @@ -312,7 +303,6 @@ </div> </td> - <td th:text="${row.getComment()}"/> <td th:text="${#dates.format(row.getWhen(), 'yyyy.MM.dd HH:mm')}"/> <td th:text="${row.getWho()}"/> </tr> @@ -338,7 +328,6 @@ <th/> <th>New</th> - <th>Comment</th> <th>When</th> <th>Who</th> </tr> @@ -365,7 +354,6 @@ </div> </td> - <td th:text="${row.getComment()}"/> <td th:text="${#dates.format(row.getWhen(), 'yyyy.MM.dd HH:mm')}"/> <td th:text="${row.getWho()}"/> </tr> diff --git a/src/test/java/org/openepics/names/docker/ConvertIT.java b/src/test/java/org/openepics/names/docker/ConvertIT.java index f051103f8fdfe660fb125ee32f192f20b361a049..91ae3f2f6ea4d940a1f9bf357b01bd513902beb4 100644 --- a/src/test/java/org/openepics/names/docker/ConvertIT.java +++ b/src/test/java/org/openepics/names/docker/ConvertIT.java @@ -76,83 +76,73 @@ class ConvertIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Acc", null, - "Accelerator. The ESS Linear Accelerator", "approved by alfio"); + "Acc", null, "Accelerator. The ESS Linear Accelerator"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemGroupAcc = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupAcc, - "RFQ", null, - "Radio Frequency Quadrupole", "empty"); + "RFQ", null, "Radio Frequency Quadrupole"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemRFQ = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "010PRL", null, - "01 Phase Reference Line", "Approved by Daniel Piso"); + "010PRL", null, "01 Phase Reference Line"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "010", null, - "RFQ-010", "Approved by Daniel Piso"); + "010", null, "RFQ-010"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); subsystem010 = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "N1U1", null, - "Power switch board 01. Electrical power cabinets", "Approved by Daniel Piso"); + "N1U1", null, "Power switch board 01. Electrical power cabinets"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "EMR", null, - "Electromagnetic Resonators", "empty"); + "EMR", null, "Electromagnetic Resonators"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineEMR = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineEMR, - null, null, - "Control", "These names are needed now, so I am approving, but please add a description to these later."); + null, null, "Control"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupEMR = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "FS", null, - "Flow Switch", "Approve names added from misc device group"); + "FS", null, "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceTypeFS = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "RFA", null, - "RF Antenna", "Approve names added from misc device group"); + "RFA", null, "RF Antenna"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "TT", null, - "Temperature Transmitter", "Approve names added from misc device group"); + "TT", null, "Temperature Transmitter"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "001", - "description", "comment"); + subsystem010, deviceTypeFS, + "001", "description"); ITUtilNames.assertCreate(nameElementCommandCreate); nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "002", - "description", "comment"); + subsystem010, deviceTypeFS, + "002", "description"); ITUtilNames.assertCreate(nameElementCommandCreate); nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "003", - "description", "comment"); + subsystem010, deviceTypeFS, + "003", "description"); ITUtilNames.assertCreate(nameElementCommandCreate); } diff --git a/src/test/java/org/openepics/names/docker/MetricsIT.java b/src/test/java/org/openepics/names/docker/MetricsIT.java index 4e8062ecc6c921077d6ee76c0410a8820dc2f211..aaf55f14cc921ff427de3a00996609df69cd3a96 100644 --- a/src/test/java/org/openepics/names/docker/MetricsIT.java +++ b/src/test/java/org/openepics/names/docker/MetricsIT.java @@ -70,49 +70,43 @@ public class MetricsIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Acc", null, - "Accelerator. The ESS Linear Accelerator", "approved by alfio"); + "Acc", null, "Accelerator. The ESS Linear Accelerator"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemGroupAcc = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupAcc, - "RFQ", null, - "Radio Frequency Quadrupole", "empty"); + "RFQ", null, "Radio Frequency Quadrupole"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemRFQ = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "010", null, - "RFQ-010", "Approved by Daniel Piso"); + "010", null, "RFQ-010"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); subsystem010 = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "EMR", null, - "Electromagnetic Resonators", "empty"); + "EMR", null, "Electromagnetic Resonators"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineEMR = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineEMR, - null, null, - "Control", "These names are needed now, so I am approving, but please add a description to these later."); + null, null, "Control"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupEMR = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "FS", null, - "Flow Switch", "Approve names added from misc device group"); + "FS", null, "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceTypeFS = approvedStructureElement.getUuid(); nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "001", - "description", "comment"); + subsystem010, deviceTypeFS, + "001", "description"); ITUtilNames.assertCreate(nameElementCommandCreate); } diff --git a/src/test/java/org/openepics/names/docker/NamesIT.java b/src/test/java/org/openepics/names/docker/NamesIT.java index f04b28a41594c72fb7bb2d8592b0fdb4b0bf1f66..c502f014417d9886db3ce54d410e96d56facbb83 100644 --- a/src/test/java/org/openepics/names/docker/NamesIT.java +++ b/src/test/java/org/openepics/names/docker/NamesIT.java @@ -68,9 +68,9 @@ class NamesIT { // NameElement, StructureElement // // NameElementCommand - // create - parentSystemStructure, parentDeviceStructure, index, description, comment - // update - uuid, parentSystemStructure, parentDeviceStructure, index, description, comment - // delete - uuid, comment + // create - parentSystemStructure, parentDeviceStructure, index, description + // update - uuid, parentSystemStructure, parentDeviceStructure, index, description + // delete - uuid // // response status codes @@ -98,71 +98,64 @@ class NamesIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Acc", null, - "Accelerator. The ESS Linear Accelerator", "approved by alfio"); + "Acc", null, "Accelerator. The ESS Linear Accelerator"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemGroupAcc = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupAcc, - "RFQ", null, - "Radio Frequency Quadrupole", "empty"); + "RFQ", null, "Radio Frequency Quadrupole"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemRFQ = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "010PRL", null, - "01 Phase Reference Line", "Approved by Daniel Piso"); + "010PRL", null, "01 Phase Reference Line"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); subsystem010PRL = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "010", null, - "RFQ-010", "Approved by Daniel Piso"); + "010", null, "RFQ-010"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); subsystem010 = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "N1U1", null, - "Power switch board 01. Electrical power cabinets", "Approved by Daniel Piso"); + "N1U1", null, "Power switch board 01. Electrical power cabinets"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); subsystemN1U1 = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "EMR", null, - "Electromagnetic Resonators", "empty"); + "EMR", null, "Electromagnetic Resonators"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineEMR = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineEMR, - null, null, - "Control", "These names are needed now, so I am approving, but please add a description to these later."); + null, null, "Control"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupEMR = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, "FS", null, - "Flow Switch", "Approve names added from misc device group"); + "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceTypeFS = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, "RFA", null, - "RF Antenna", "Approve names added from misc device group"); + "RF Antenna"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceTypeRFA = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, "TT", null, - "Temperature Transmitter", "Approve names added from misc device group"); + "Temperature Transmitter"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceTypeTT = approvedStructureElement.getUuid(); @@ -217,8 +210,8 @@ class NamesIT { ResponsePageNameElements response, response2 = null; nameElementCommand = new NameElementCommand( - null, subsystemN1U1, deviceTypeRFA, "071", - "description", "comment"); + null, subsystemN1U1, deviceTypeRFA, + "071", "description"); nameElementCommandCreate = NameElementUtil.convertCommand2CommandCreate(nameElementCommand); nameElementCommandUpdate = NameElementUtil.convertCommand2CommandUpdate(nameElementCommand); nameElementCommandConfirm = NameElementUtil.convertCommand2CommandConfirm(nameElementCommand); @@ -275,7 +268,7 @@ class NamesIT { // delete, approve structureElementCommandConfirm = new StructureElementCommandConfirm( - subsystemN1U1, Type.SUBSYSTEM, "comment"); + subsystemN1U1, Type.SUBSYSTEM); ITUtilStructures.assertDelete(structureElementCommandConfirm); @@ -467,7 +460,6 @@ class NamesIT { // or system structure + device structure + index // + // description - // comment try { NameElementCommandCreate nameElementCommandCreate = new NameElementCommandCreate(); @@ -488,16 +480,11 @@ class NamesIT { // system structure // subsystem // description - // comment nameElementCommandCreate.setDescription("description"); ITUtilNames.assertValidate(nameElementCommandCreate, NameCommand.CREATE, Boolean.FALSE); ITUtilNames.assertCreate(nameElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - nameElementCommandCreate.setComment("comment"); - ITUtilNames.assertValidate(nameElementCommandCreate, NameCommand.CREATE, Boolean.FALSE); - ITUtilNames.assertCreate(nameElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - // convention name exists // already exists since create subsystem was approved nameElementCommandCreate.setParentSystemStructure(subsystem010PRL); @@ -508,7 +495,6 @@ class NamesIT { // system structure + device structure + index // subsystem, device type // description - // comment nameElementCommandCreate.setIndex("051"); ITUtilNames.assertValidate(nameElementCommandCreate, NameCommand.CREATE, Boolean.FALSE); @@ -530,7 +516,6 @@ class NamesIT { // system structure // system // description - // comment // convention name exists // already exists since create system was approved @@ -542,7 +527,6 @@ class NamesIT { // system structure + device structure + index // system, device type // description - // comment nameElementCommandCreate.setIndex("051"); ITUtilNames.assertValidate(nameElementCommandCreate, NameCommand.CREATE, Boolean.FALSE); @@ -564,7 +548,6 @@ class NamesIT { // system structure // system group // description - // comment // convention name exists // already exists since create system group was approved @@ -575,7 +558,6 @@ class NamesIT { // system structure + device structure + index // system group, device type // description - // comment nameElementCommandCreate.setIndex("051"); ITUtilNames.assertValidate(nameElementCommandCreate, NameCommand.CREATE, Boolean.FALSE); @@ -600,7 +582,6 @@ class NamesIT { // system structure + device structure // system, device type // description - // comment // convention name exists // already exists since create system was approved @@ -653,12 +634,12 @@ class NamesIT { NameElementCommandCreate nameElementCommandCreate2 = null; nameElementCommandCreate = new NameElementCommandCreate( - subsystem010PRL, deviceTypeRFA, "052", - "description", "comment"); + subsystem010PRL, deviceTypeRFA, + "052", "description"); nameElementCommandCreate2 = new NameElementCommandCreate( - subsystem010PRL, deviceTypeRFA, "061", - "description", "comment"); + subsystem010PRL, deviceTypeRFA, + "061", "description"); ITUtilNames.assertExists("RFQ-010PRL:EMR-RFA-052", Boolean.FALSE); ITUtilNames.assertIsLegacy("RFQ-010PRL:EMR-RFA-052", Boolean.FALSE); @@ -708,7 +689,6 @@ class NamesIT { // or system structure + device structure + index // + // description - // comment try { NameElementCommandCreate nameElementCommandCreate = null; @@ -716,8 +696,8 @@ class NamesIT { NameElement createdNameElement = null; nameElementCommandCreate = new NameElementCommandCreate( - subsystem010PRL, deviceTypeRFA, "053", - "description", "comment"); + subsystem010PRL, deviceTypeRFA, + "053", "description"); // create createdNameElement = ITUtilNames.assertCreate(nameElementCommandCreate); @@ -739,13 +719,6 @@ class NamesIT { nameElementCommandUpdate.setDescription("checkUpdate"); ITUtilNames.assertValidate(nameElementCommandUpdate, NameCommand.UPDATE, Boolean.TRUE); - nameElementCommandUpdate.setComment(null); - ITUtilNames.assertValidate(nameElementCommandUpdate, NameCommand.UPDATE, Boolean.FALSE); - ITUtilNames.assertUpdate(nameElementCommandUpdate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - nameElementCommandUpdate.setComment("checkUpdate"); - ITUtilNames.assertValidate(nameElementCommandUpdate, NameCommand.UPDATE, Boolean.TRUE); - // ---------- nameElementCommandUpdate.setParentSystemStructure(null); @@ -852,8 +825,8 @@ class NamesIT { NameElement createdNameElement = null; nameElementCommand = new NameElementCommand( - null, subsystem010PRL, deviceTypeRFA, "054", - "description", "comment"); + null, subsystem010PRL, deviceTypeRFA, + "054", "description"); nameElementCommandCreate = NameElementUtil.convertCommand2CommandCreate(nameElementCommand); nameElementCommandUpdate = NameElementUtil.convertCommand2CommandUpdate(nameElementCommand); @@ -871,14 +844,12 @@ class NamesIT { ITUtilNames.assertValidate(nameElementCommandUpdate, NameCommand.UPDATE, Boolean.TRUE); nameElementCommandUpdate.setDescription("updated description"); - nameElementCommandUpdate.setComment("updated comment"); ITUtilNames.assertValidate(nameElementCommandUpdate, NameCommand.UPDATE, Boolean.TRUE); // update ITUtilNames.assertUpdate(nameElementCommandUpdate); nameElementCommandUpdate.setDescription("another description"); - nameElementCommandUpdate.setComment("another comment"); ITUtilNames.assertValidate(nameElementCommandUpdate, NameCommand.UPDATE, Boolean.TRUE); } catch (Exception e) { @@ -902,7 +873,6 @@ class NamesIT { // // validate delete // uuid - // comment try { NameElementCommandCreate nameElementCommandCreate = null; @@ -910,8 +880,8 @@ class NamesIT { NameElement createdNameElement = null; nameElementCommandCreate = new NameElementCommandCreate( - subsystem010PRL, deviceTypeRFA, "055", - "description", "comment"); + subsystem010PRL, deviceTypeRFA, + "055", "description"); // create createdNameElement = ITUtilNames.assertCreate(nameElementCommandCreate); @@ -931,13 +901,6 @@ class NamesIT { nameElementCommandConfirm.setUuid(createdNameElement.getUuid()); ITUtilNames.assertValidate(nameElementCommandConfirm, NameCommand.DELETE, Boolean.TRUE); - - nameElementCommandConfirm.setComment(null); - ITUtilNames.assertValidate(nameElementCommandConfirm, NameCommand.DELETE, Boolean.FALSE); - ITUtilNames.assertDelete(nameElementCommandConfirm, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - nameElementCommandConfirm.setComment("checkDelete"); - ITUtilNames.assertValidate(nameElementCommandConfirm, NameCommand.DELETE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -963,8 +926,8 @@ class NamesIT { NameElement createdNameElement = null; nameElementCommandCreate = new NameElementCommandCreate( - subsystem010PRL, deviceTypeRFA, "056", - "description", "comment"); + subsystem010PRL, deviceTypeRFA, + "056", "description"); ITUtilNames.assertValidate(nameElementCommandCreate, NameCommand.DELETE, Boolean.FALSE); @@ -974,10 +937,6 @@ class NamesIT { ITUtilNames.assertValidate(nameElementCommandConfirm, NameCommand.DELETE, Boolean.TRUE); - nameElementCommandConfirm.setComment("deleted comment"); - - ITUtilNames.assertValidate(nameElementCommandConfirm, NameCommand.DELETE, Boolean.TRUE); - // delete ITUtilNames.assertDelete(nameElementCommandConfirm); @@ -1010,58 +969,56 @@ class NamesIT { NameElement nameElement1, nameElement7, nameElement8 = null; nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "001", - "description", "comment"); + subsystem010, deviceTypeFS, + "001", "description"); // create nameElement1 = ITUtilNames.assertCreate(nameElementCommandCreate); uuid = nameElement1.getUuid(); nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "002", - "description", "comment"); + subsystem010, deviceTypeFS, + "002", "description"); responseNameElement = ITUtilNames.assertCreate(nameElementCommandCreate); uuid2 = responseNameElement.getUuid(); nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "003", - "description", "comment"); + subsystem010, deviceTypeFS, + "003", "description"); ITUtilNames.assertCreate(nameElementCommandCreate); nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "004", - "description", "comment"); + subsystem010, deviceTypeFS, + "004", "description"); ITUtilNames.assertCreate(nameElementCommandCreate); nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "005", - "description", "comment"); + subsystem010, deviceTypeFS, + "005", "description"); ITUtilNames.assertCreate(nameElementCommandCreate); nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "006", - "description", "comment"); + subsystem010, deviceTypeFS, + "006", "description"); ITUtilNames.assertCreate(nameElementCommandCreate); nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "007", - "description", "comment"); + subsystem010, deviceTypeFS, + "007", "description"); nameElement7 = ITUtilNames.assertCreate(nameElementCommandCreate); nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "008", - "description", "comment"); + subsystem010, deviceTypeFS, + "008", "description"); nameElement8 = ITUtilNames.assertCreate(nameElementCommandCreate); // update element 1 twice nameElementCommandUpdate = NameElementUtil.convertElement2CommandUpdate(nameElement1); nameElementCommandUpdate.setDescription("updated description"); - nameElementCommandUpdate.setComment("updated comment"); ITUtilNames.assertUpdate(nameElementCommandUpdate); nameElementCommandUpdate.setDescription("updated description again"); - nameElementCommandUpdate.setComment("updated comment again"); ITUtilNames.assertUpdate(nameElementCommandUpdate); diff --git a/src/test/java/org/openepics/names/docker/PvNamesIT.java b/src/test/java/org/openepics/names/docker/PvNamesIT.java index e3f3aa1d212b335da33aef73fa323a45a2e423a8..6b59d273386554bc4a4729d52f9b80ed6806e6ca 100644 --- a/src/test/java/org/openepics/names/docker/PvNamesIT.java +++ b/src/test/java/org/openepics/names/docker/PvNamesIT.java @@ -65,43 +65,37 @@ public class PvNamesIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Acc", null, - "Accelerator. The ESS Linear Accelerator", "approved by alfio"); + "Acc", null, "Accelerator. The ESS Linear Accelerator"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemGroupAcc = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupAcc, - "RFQ", null, - "Radio Frequency Quadrupole", "empty"); + "RFQ", null, "Radio Frequency Quadrupole"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemRFQ = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "010", null, - "RFQ-010", "Approved by Daniel Piso"); + "010", null, "RFQ-010"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); subsystem010 = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "EMR", null, - "Electromagnetic Resonators", "empty"); + "EMR", null, "Electromagnetic Resonators"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineEMR = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineEMR, - null, null, - "Control", "These names are needed now, so I am approving, but please add a description to these later."); + null, null, "Control"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupEMR = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "FS", null, - "Flow Switch", "Approve names added from misc device group"); + "FS", null, "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceTypeFS = approvedStructureElement.getUuid(); } @@ -121,8 +115,8 @@ public class PvNamesIT { NameElementCommandCreate nameElementCommandCreate = null; nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "001", - "description", "comment"); + subsystem010, deviceTypeFS, + "001", "description"); ITUtilNames.assertCreate(nameElementCommandCreate); diff --git a/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java b/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java index 5249b5d57cd311db92d2735c344ddef85cf70f98..e3c856ff3322360c5222c3c34bd07b3778f2beba 100644 --- a/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java @@ -69,7 +69,7 @@ class StructuresDeviceGroupIT { // attributes for entry for operations - create, update, delete, approve, cancel, reject // some set client side, others set server side // client side - // type, uuid, parent uuid, name, mnemonic, description, comment + // type, uuid, parent uuid, name, mnemonic, description // may be set client side for test purposes // order of methods in test not known // therefore mnemonic values chosen to not interfere with mnemonic values in other methods @@ -79,12 +79,12 @@ class StructuresDeviceGroupIT { // for such operations that send Command objects to backend, it is also possible to send StructureElement // // StructureElementCommand - // create - type, parent, name, mnemonic, description, comment - // update - uuid, type, parent, name, mnemonic, description, comment - // delete - uuid, type, comment - // approve - uuid, type, comment - // cancel - uuid, type, comment - // reject - uuid, type, comment + // create - type, parent, name, mnemonic, description + // update - uuid, type, parent, name, mnemonic, description + // delete - uuid, type + // approve - uuid, type + // cancel - uuid, type + // reject - uuid, type // // response status codes @@ -103,15 +103,13 @@ class StructuresDeviceGroupIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Di", null, - "description", "comment"); + "Di", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineUuid = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Di2", null, - "description", "comment"); + "Di2", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); discipline2Uuid = approvedStructureElement.getUuid(); @@ -149,7 +147,6 @@ class StructuresDeviceGroupIT { // name // mnemonic // description - // comment try { StructureElementCommandCreate structureElementCommandCreate = new StructureElementCommandCreate(); @@ -178,10 +175,6 @@ class StructuresDeviceGroupIT { ITUtilStructures.assertCreate(structureElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); structureElementCommandCreate.setDescription("description"); - ITUtilStructures.assertValidate(structureElementCommandCreate, StructureCommand.CREATE, Boolean.FALSE); - ITUtilStructures.assertCreate(structureElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandCreate.setComment("comment"); ITUtilStructures.assertValidate(structureElementCommandCreate, StructureCommand.CREATE, Boolean.TRUE); structureElementCommandCreate.setType(null); @@ -214,7 +207,6 @@ class StructuresDeviceGroupIT { structureElementCommandCreate.setType(Type.DEVICEGROUP); structureElementCommandCreate.setParent(disciplineUuid); structureElementCommandCreate.setDescription("description"); - structureElementCommandCreate.setComment("comment"); // mnemonic rules @@ -356,8 +348,7 @@ class StructuresDeviceGroupIT { structureElementCommand = new StructureElementCommand( null, Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -421,8 +412,7 @@ class StructuresDeviceGroupIT { structureElementCommand = new StructureElementCommand( null, Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -486,8 +476,7 @@ class StructuresDeviceGroupIT { structureElementCommand = new StructureElementCommand( null, Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -552,7 +541,6 @@ class StructuresDeviceGroupIT { // name // mnemonic // description - // comment try { UUID uuid = null; @@ -564,8 +552,7 @@ class StructuresDeviceGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); uuid = approvedStructureElement.getUuid(); @@ -619,13 +606,6 @@ class StructuresDeviceGroupIT { structureElementCommandUpdate.setDescription("description"); ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); - - structureElementCommandUpdate.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.FALSE); - ITUtilStructures.assertUpdate(structureElementCommandUpdate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandUpdate.setComment("comment"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -656,14 +636,11 @@ class StructuresDeviceGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update approve check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.APPROVE, Boolean.FALSE); @@ -718,14 +695,11 @@ class StructuresDeviceGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update cancel check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); @@ -780,14 +754,11 @@ class StructuresDeviceGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update reject check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.REJECT, Boolean.FALSE); @@ -834,7 +805,6 @@ class StructuresDeviceGroupIT { // validate delete // uuid // type - // comment try { UUID uuid = null; @@ -846,8 +816,7 @@ class StructuresDeviceGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); uuid = approvedStructureElement.getUuid(); @@ -877,13 +846,6 @@ class StructuresDeviceGroupIT { structureElementCommandConfirm.setType(Type.DEVICEGROUP); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); - - structureElementCommandConfirm.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.FALSE); - ITUtilStructures.assertDelete(structureElementCommandConfirm, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandConfirm.setComment("comment"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -913,13 +875,10 @@ class StructuresDeviceGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment delete approve check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.APPROVE, Boolean.FALSE); @@ -973,13 +932,10 @@ class StructuresDeviceGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment update delete check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); @@ -1033,13 +989,10 @@ class StructuresDeviceGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment delete reject check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.REJECT, Boolean.FALSE); @@ -1087,8 +1040,7 @@ class StructuresDeviceGroupIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, 41, - "description", "comment"); + null, 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1185,8 +1137,7 @@ class StructuresDeviceGroupIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, 41, - "description", "comment"); + null, 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1283,8 +1234,7 @@ class StructuresDeviceGroupIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, 41, - "description", "comment"); + null, 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1392,32 +1342,28 @@ class StructuresDeviceGroupIT { // a number of entries for which the last entry has status PENDING structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, 1, - "description", "comment"); + null, 1, "description"); createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); uuid = createdStructureElement.getUuid(); // a number of entries for which the last entry has status CANCELLED structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, 2, - "description", "comment"); + null, 2, "description"); createdStructureElement = ITUtilStructures.assertCreateCancel(structureElementCommandCreate); uuid2 = createdStructureElement.getUuid(); // a number of entries for which the last entry has status REJECTED structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, 3, - "description", "comment"); + null, 3, "description"); createdStructureElement = ITUtilStructures.assertCreateReject(structureElementCommandCreate); uuid3 = createdStructureElement.getUuid(); // a number of entries for which the last entry has status APPROVED structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, 4, - "description", "comment"); + null, 4, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); uuid4 = createdStructureElement.getUuid(); @@ -1486,105 +1432,101 @@ class StructuresDeviceGroupIT { // a number of entries for which the last entry has status PENDING structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); responseStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(responseStructureElement); uuid = responseStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdate(structureElementCommandUpdate); // a number of entries for which the last entry has status CANCELLED structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, 2, - "description", "comment"); + null, 2, "description"); responseStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(responseStructureElement); uuid2 = responseStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); // a number of entries for which the last entry has status REJECTED structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, 1, - "description", "comment"); + null, 1, "description"); responseStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(responseStructureElement); uuid3 = responseStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); // a number of entries for which the last entry has status APPROVED structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, 1, - "description", "comment"); + null, 1, "description"); responseStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(responseStructureElement); uuid4 = responseStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); try { @@ -1654,73 +1596,69 @@ class StructuresDeviceGroupIT { // create + approve structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 1, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 1, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 1, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 1, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 1, "description", "comment") + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 1, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 1, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 1, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 1, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 1, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); uuid = approvedStructureElements[0].getUuid(); // create + cancel structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 2, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 2, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 2, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 2, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 2, "description", "comment") + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 2, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 2, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 2, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 2, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 2, "description") }; ITUtilStructures.assertCreateCancel(structureElementCommandsCreate); // create + reject structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 3, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 3, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 3, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 3, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 3, "description", "comment"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 3, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 3, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 3, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 3, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 3, "description"), }; ITUtilStructures.assertCreateReject(structureElementCommandsCreate); // create structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 4, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 4, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 4, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 4, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 4, "description", "comment") + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 4, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 4, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 4, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 4, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 4, "description") }; ITUtilStructures.assertCreate(structureElementCommandsCreate); String description2 = "some other description"; - String comment2 = "some other comment"; String description3 = "more description"; - String comment3 = "more comment"; // create + approve // update + approve // update + approve // delete + reject structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 5, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 5, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 5, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 5, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 5, "description", "comment") + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 5, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 5, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 5, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 5, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 5, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description2); - structureElementCommandUpdate.setComment(comment2); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description3); - structureElementCommandUpdate.setComment(comment3); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1729,11 +1667,11 @@ class StructuresDeviceGroupIT { // create + approve // delete + approve structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 6, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 6, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 6, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 6, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 6, "description", "comment") + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 6, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 6, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 6, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 6, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 6, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1742,11 +1680,11 @@ class StructuresDeviceGroupIT { // create + approve // delete structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 7, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 7, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 7, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 7, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 7, "description", "comment") + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 7, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 7, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 7, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 7, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 7, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1760,11 +1698,11 @@ class StructuresDeviceGroupIT { // delete + reject // delete structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 8, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 8, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 8, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 8, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 8, "description", "comment") + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 8, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 8, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 8, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 8, "description"), + new StructureElementCommandCreate(Type.DEVICEGROUP, discipline2Uuid, null, 8, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); uuid2 = approvedStructureElements[0].getUuid(); @@ -1772,13 +1710,11 @@ class StructuresDeviceGroupIT { structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description2); - structureElementCommandUpdate.setComment(comment2); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description3); - structureElementCommandUpdate.setComment(comment3); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); diff --git a/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java b/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java index 69044fde5bd04e2921d6aef27f0107917360fa52..7eace1dba90219fb4e5be2e7adddde4b1096d190 100644 --- a/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java @@ -69,7 +69,7 @@ class StructuresDeviceTypeIT { // attributes for entry for operations - create, update, delete, approve, cancel, reject // some set client side, others set server side // client side - // type, uuid, parent uuid, name, mnemonic, description, comment + // type, uuid, parent uuid, name, mnemonic, description // may be set client side for test purposes // order of methods in test not known // therefore mnemonic values chosen to not interfere with mnemonic values in other methods @@ -79,12 +79,12 @@ class StructuresDeviceTypeIT { // for such operations that send Command objects to backend, it is also possible to send StructureElement // // StructureElementCommand - // create - type, parent, name, mnemonic, description, comment - // update - uuid, type, parent, name, mnemonic, description, comment - // delete - uuid, type, comment - // approve - uuid, type, comment - // cancel - uuid, type, comment - // reject - uuid, type, comment + // create - type, parent, name, mnemonic, description + // update - uuid, type, parent, name, mnemonic, description + // delete - uuid, type + // approve - uuid, type + // cancel - uuid, type + // reject - uuid, type // // response status codes @@ -103,15 +103,13 @@ class StructuresDeviceTypeIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Di", null, - "description", "comment"); + "Di", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineUuid = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupUuid = approvedStructureElement.getUuid(); @@ -149,7 +147,6 @@ class StructuresDeviceTypeIT { // name // mnemonic // description - // comment try { StructureElementCommandCreate structureElementCommandCreate = new StructureElementCommandCreate(); @@ -194,10 +191,6 @@ class StructuresDeviceTypeIT { ITUtilStructures.assertCreate(structureElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); structureElementCommandCreate.setDescription("description"); - ITUtilStructures.assertValidate(structureElementCommandCreate, StructureCommand.CREATE, Boolean.FALSE); - ITUtilStructures.assertCreate(structureElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandCreate.setComment("comment"); ITUtilStructures.assertValidate(structureElementCommandCreate, StructureCommand.CREATE, Boolean.TRUE); structureElementCommandCreate.setType(null); @@ -225,7 +218,6 @@ class StructuresDeviceTypeIT { structureElementCommandCreate.setType(Type.DEVICETYPE); structureElementCommandCreate.setParent(deviceGroupUuid); structureElementCommandCreate.setDescription("description"); - structureElementCommandCreate.setComment("comment"); // mnemonic rules @@ -354,8 +346,7 @@ class StructuresDeviceTypeIT { structureElementCommand = new StructureElementCommand( null, Type.DEVICETYPE, deviceGroupUuid, - "Ca", null, - "description", "comment"); + "Ca", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -415,8 +406,7 @@ class StructuresDeviceTypeIT { structureElementCommand = new StructureElementCommand( null, Type.DEVICETYPE, deviceGroupUuid, - "Cc", null, - "description", "comment"); + "Cc", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -481,8 +471,7 @@ class StructuresDeviceTypeIT { structureElementCommand = new StructureElementCommand( null, Type.DEVICETYPE, deviceGroupUuid, - "Cr", null, - "description", "comment"); + "Cr", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -548,7 +537,6 @@ class StructuresDeviceTypeIT { // name // mnemonic // description - // comment try { UUID uuid = null; @@ -560,8 +548,7 @@ class StructuresDeviceTypeIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "Cu", null, - "description", "comment"); + "Cu", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); uuid = approvedStructureElement.getUuid(); @@ -615,13 +602,6 @@ class StructuresDeviceTypeIT { structureElementCommandUpdate.setDescription("description"); ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); - - structureElementCommandUpdate.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.FALSE); - ITUtilStructures.assertUpdate(structureElementCommandUpdate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandUpdate.setComment("comment"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -652,14 +632,11 @@ class StructuresDeviceTypeIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "Ua", null, - "description", "comment"); + "Ua", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update approve check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.APPROVE, Boolean.FALSE); @@ -714,14 +691,11 @@ class StructuresDeviceTypeIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "Uc", null, - "description", "comment"); + "Uc", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update cancel check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); @@ -776,14 +750,11 @@ class StructuresDeviceTypeIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "Ur", null, - "description", "comment"); + "Ur", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update reject check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.REJECT, Boolean.FALSE); @@ -830,7 +801,6 @@ class StructuresDeviceTypeIT { // validate delete // uuid // type - // comment try { UUID uuid = null; @@ -842,8 +812,7 @@ class StructuresDeviceTypeIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "Cd", null, - "description", "comment"); + "Cd", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); uuid = approvedStructureElement.getUuid(); @@ -873,13 +842,6 @@ class StructuresDeviceTypeIT { structureElementCommandConfirm.setType(Type.DEVICETYPE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); - - structureElementCommandConfirm.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.FALSE); - ITUtilStructures.assertDelete(structureElementCommandConfirm, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandConfirm.setComment("comment"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -909,13 +871,10 @@ class StructuresDeviceTypeIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "Da", null, - "description", "comment"); + "Da", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment delete approve check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.APPROVE, Boolean.FALSE); @@ -969,13 +928,10 @@ class StructuresDeviceTypeIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "Dc", null, - "description", "comment"); + "Dc", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment update delete check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); @@ -1036,13 +992,10 @@ class StructuresDeviceTypeIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "Dr", null, - "description", "comment"); + "Dr", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment delete reject check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.REJECT, Boolean.FALSE); @@ -1083,8 +1036,7 @@ class StructuresDeviceTypeIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "Rsha", 41, - "description", "comment"); + "Rsha", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1183,8 +1135,7 @@ class StructuresDeviceTypeIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "Rshc", 41, - "description", "comment"); + "Rshc", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1283,8 +1234,7 @@ class StructuresDeviceTypeIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "Rshr", 41, - "description", "comment"); + "Rshr", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1394,32 +1344,28 @@ class StructuresDeviceTypeIT { // a number of entries for which the last entry has status PENDING structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "P1", 1, - "description", "comment"); + "P1", 1, "description"); createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); uuid = createdStructureElement.getUuid(); // a number of entries for which the last entry has status CANCELLED structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "C1", 2, - "description", "comment"); + "C1", 2, "description"); createdStructureElement = ITUtilStructures.assertCreateCancel(structureElementCommandCreate); uuid2 = createdStructureElement.getUuid(); // a number of entries for which the last entry has status REJECTED structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "R1", 3, - "description", "comment"); + "R1", 3, "description"); createdStructureElement = ITUtilStructures.assertCreateReject(structureElementCommandCreate); uuid3 = createdStructureElement.getUuid(); // a number of entries for which the last entry has status APPROVED structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "A1", 4, - "description", "comment"); + "A1", 4, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); uuid4 = createdStructureElement.getUuid(); @@ -1491,105 +1437,101 @@ class StructuresDeviceTypeIT { // a number of entries for which the last entry has status PENDING structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "P9", null, - "description", "comment"); + "P9", null, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdate(structureElementCommandUpdate); // a number of entries for which the last entry has status CANCELLED structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "C9", 2, - "description", "comment"); + "C9", 2, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid2 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); // a number of entries for which the last entry has status REJECTED structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "R9", 1, - "description", "comment"); + "R9", 1, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid3 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); // a number of entries for which the last entry has status APPROVED structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "A9", 1, - "description", "comment"); + "A9", 1, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid4 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); try { @@ -1662,73 +1604,69 @@ class StructuresDeviceTypeIT { // create + approve structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AA1", 1, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AA2", 1, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AA3", 1, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AA4", 1, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AA5", 1, "description", "comment") + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AA1", 1, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AA2", 1, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AA3", 1, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AA4", 1, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AA5", 1, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); uuid = approvedStructureElements[0].getUuid(); // create + cancel structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AB1", 2, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AB2", 2, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AB3", 2, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AB4", 2, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AB5", 2, "description", "comment") + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AB1", 2, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AB2", 2, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AB3", 2, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AB4", 2, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AB5", 2, "description") }; ITUtilStructures.assertCreateCancel(structureElementCommandsCreate); // create + reject structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AC1", 3, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AC2", 3, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AC3", 3, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AC4", 3, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AC5", 3, "description", "comment") + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AC1", 3, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AC2", 3, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AC3", 3, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AC4", 3, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AC5", 3, "description") }; ITUtilStructures.assertCreateReject(structureElementCommandsCreate); // create structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AD1", 4, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AD2", 4, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AD3", 4, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AD4", 4, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AD5", 4, "description", "comment") + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AD1", 4, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AD2", 4, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AD3", 4, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AD4", 4, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AD5", 4, "description") }; ITUtilStructures.assertCreate(structureElementCommandsCreate); String description2 = "some other description"; - String comment2 = "some other comment"; String description3 = "more description"; - String comment3 = "more comment"; // create + approve // update + approve // update + approve // delete + reject structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AE1", 5, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AE2", 5, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AE3", 5, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AE4", 5, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AE5", 5, "description", "comment") + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AE1", 5, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AE2", 5, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AE3", 5, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AE4", 5, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AE5", 5, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description2); - structureElementCommandUpdate.setComment(comment2); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description3); - structureElementCommandUpdate.setComment(comment3); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1737,11 +1675,11 @@ class StructuresDeviceTypeIT { // create + approve // delete + approve structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AF1", 6, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AF2", 6, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AF3", 6, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AF4", 6, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AF5", 6, "description", "comment") + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AF1", 6, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AF2", 6, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AF3", 6, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AF4", 6, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AF5", 6, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1750,11 +1688,11 @@ class StructuresDeviceTypeIT { // create + approve // delete structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AG1", 7, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AG2", 7, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AG3", 7, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AG4", 7, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AG5", 7, "description", "comment") + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AG1", 7, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AG2", 7, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AG3", 7, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AG4", 7, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AG5", 7, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1768,11 +1706,11 @@ class StructuresDeviceTypeIT { // delete + reject // delete structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AH1", 8, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AH2", 8, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AH3", 8, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AH4", 8, "description", "comment"), - new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AH5", 8, "description", "comment") + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AH1", 8, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AH2", 8, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AH3", 8, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AH4", 8, "description"), + new StructureElementCommandCreate(Type.DEVICETYPE, deviceGroupUuid, "AH5", 8, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); uuid2 = approvedStructureElements[0].getUuid(); @@ -1780,13 +1718,11 @@ class StructuresDeviceTypeIT { structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description2); - structureElementCommandUpdate.setComment(comment2); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description3); - structureElementCommandUpdate.setComment(comment3); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); diff --git a/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java b/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java index c2994cb4a86bf0bbeaecdbf6c30ca59fc0ffea83..3a1ff2909d66e9ce776f78cc9317d58834abcf1d 100644 --- a/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java @@ -68,7 +68,7 @@ class StructuresDisciplineIT { // attributes for entry for operations - create, update, delete, approve, cancel, reject // some set client side, others set server side // client side - // type, uuid, parent uuid, name, mnemonic, description, comment + // type, uuid, parent uuid, name, mnemonic, description // may be set client side for test purposes // order of methods in test not known // therefore mnemonic values chosen to not interfere with mnemonic values in other methods @@ -78,12 +78,12 @@ class StructuresDisciplineIT { // for such operations that send Command objects to backend, it is also possible to send StructureElement // // StructureElementCommand - // create - type, parent, name, mnemonic, description, comment - // update - uuid, type, parent, name, mnemonic, description, comment - // delete - uuid, type, comment - // approve - uuid, type, comment - // cancel - uuid, type, comment - // reject - uuid, type, comment + // create - type, parent, name, mnemonic, description + // update - uuid, type, parent, name, mnemonic, description + // delete - uuid, type + // approve - uuid, type + // cancel - uuid, type + // reject - uuid, type // // response status codes @@ -113,7 +113,6 @@ class StructuresDisciplineIT { // name // mnemonic // description - // comment try { StructureElementCommandCreate structureElementCommandCreate = new StructureElementCommandCreate(); @@ -142,10 +141,6 @@ class StructuresDisciplineIT { ITUtilStructures.assertCreate(structureElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); structureElementCommandCreate.setDescription("description"); - ITUtilStructures.assertValidate(structureElementCommandCreate, StructureCommand.CREATE, Boolean.FALSE); - ITUtilStructures.assertCreate(structureElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandCreate.setComment("comment"); ITUtilStructures.assertValidate(structureElementCommandCreate, StructureCommand.CREATE, Boolean.TRUE); structureElementCommandCreate.setType(null); @@ -172,7 +167,6 @@ class StructuresDisciplineIT { structureElementCommandCreate.setType(Type.DISCIPLINE); structureElementCommandCreate.setDescription("description"); - structureElementCommandCreate.setComment("comment"); // mnemonic rules @@ -288,8 +282,7 @@ class StructuresDisciplineIT { structureElementCommand = new StructureElementCommand( null, Type.DISCIPLINE, null, - "Ca", null, - "description", "comment"); + "Ca", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -349,8 +342,7 @@ class StructuresDisciplineIT { structureElementCommand = new StructureElementCommand( null, Type.DISCIPLINE, null, - "Cc", null, - "description", "comment"); + "Cc", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -415,8 +407,7 @@ class StructuresDisciplineIT { structureElementCommand = new StructureElementCommand( null, Type.DISCIPLINE, null, - "Cr", null, - "description", "comment"); + "Cr", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -481,7 +472,6 @@ class StructuresDisciplineIT { // name // mnemonic // description - // comment try { UUID uuid = null; @@ -493,8 +483,7 @@ class StructuresDisciplineIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Cu", null, - "description", "comment"); + "Cu", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); uuid = approvedStructureElement.getUuid(); @@ -541,13 +530,6 @@ class StructuresDisciplineIT { structureElementCommandUpdate.setDescription("description"); ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); - - structureElementCommandUpdate.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.FALSE); - ITUtilStructures.assertUpdate(structureElementCommandUpdate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandUpdate.setComment("comment"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -578,14 +560,11 @@ class StructuresDisciplineIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Ua", null, - "description", "comment"); + "Ua", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update approve check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.APPROVE, Boolean.FALSE); @@ -640,14 +619,11 @@ class StructuresDisciplineIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Uc", null, - "description", "comment"); + "Uc", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update cancel check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); @@ -702,14 +678,11 @@ class StructuresDisciplineIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Ur", null, - "description", "comment"); + "Ur", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update reject check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.REJECT, Boolean.FALSE); @@ -756,7 +729,6 @@ class StructuresDisciplineIT { // validate delete // uuid // type - // comment try { UUID uuid = null; @@ -768,8 +740,7 @@ class StructuresDisciplineIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Cd", null, - "description", "comment"); + "Cd", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); uuid = approvedStructureElement.getUuid(); @@ -799,13 +770,6 @@ class StructuresDisciplineIT { structureElementCommandConfirm.setType(Type.DISCIPLINE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); - - structureElementCommandConfirm.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.FALSE); - ITUtilStructures.assertDelete(structureElementCommandConfirm, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandConfirm.setComment("comment"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -835,13 +799,10 @@ class StructuresDisciplineIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Da", null, - "description", "comment"); + "Da", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment delete approve check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.APPROVE, Boolean.FALSE); @@ -895,13 +856,10 @@ class StructuresDisciplineIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Dc", null, - "description", "comment"); + "Dc", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment update delete check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); @@ -955,13 +913,10 @@ class StructuresDisciplineIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Dr", null, - "description", "comment"); + "Dr", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment delete reject check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.REJECT, Boolean.FALSE); @@ -1009,8 +964,7 @@ class StructuresDisciplineIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Rsha", 41, - "description", "comment"); + "Rsha", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1091,8 +1045,7 @@ class StructuresDisciplineIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Rshc", 41, - "description", "comment"); + "Rshc", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1173,8 +1126,7 @@ class StructuresDisciplineIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Rshr", 41, - "description", "comment"); + "Rshr", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1266,32 +1218,28 @@ class StructuresDisciplineIT { // a number of entries for which the last entry has status PENDING structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "P1", 1, - "description", "comment"); + "P1", 1, "description"); createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); uuid = createdStructureElement.getUuid(); // a number of entries for which the last entry has status CANCELLED structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "C1", 2, - "description", "comment"); + "C1", 2, "description"); createdStructureElement = ITUtilStructures.assertCreateCancel(structureElementCommandCreate); uuid2 = createdStructureElement.getUuid(); // a number of entries for which the last entry has status REJECTED structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "R1", 3, - "description", "comment"); + "R1", 3, "description"); createdStructureElement = ITUtilStructures.assertCreateReject(structureElementCommandCreate); uuid3 = createdStructureElement.getUuid(); // a number of entries for which the last entry has status APPROVED structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "A1", 4, - "description", "comment"); + "A1", 4, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); uuid4 = createdStructureElement.getUuid(); @@ -1359,105 +1307,101 @@ class StructuresDisciplineIT { // a number of entries for which the last entry has status PENDING structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "P9", null, - "description", "comment"); + "P9", null, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdate(structureElementCommandUpdate); // a number of entries for which the last entry has status CANCELLED structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "C9", 2, - "description", "comment"); + "C9", 2, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid2 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); // a number of entries for which the last entry has status REJECTED structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "R9", 1, - "description", "comment"); + "R9", 1, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid3 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); // a number of entries for which the last entry has status APPROVED structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "A9", 1, - "description", "comment"); + "A9", 1, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid4 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); try { @@ -1526,73 +1470,69 @@ class StructuresDisciplineIT { // create + approve structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AA1", 1, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AA2", 1, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AA3", 1, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AA4", 1, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AA5", 1, "description", "comment") + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AA1", 1, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AA2", 1, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AA3", 1, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AA4", 1, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AA5", 1, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); uuid = approvedStructureElements[0].getUuid(); // create + cancel structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AB1", 2, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AB2", 2, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AB3", 2, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AB4", 2, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AB5", 2, "description", "comment") + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AB1", 2, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AB2", 2, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AB3", 2, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AB4", 2, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AB5", 2, "description") }; ITUtilStructures.assertCreateCancel(structureElementCommandsCreate); // create + reject structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AC1", 3, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AC2", 3, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AC3", 3, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AC4", 3, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AC5", 3, "description", "comment") + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AC1", 3, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AC2", 3, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AC3", 3, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AC4", 3, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AC5", 3, "description") }; ITUtilStructures.assertCreateReject(structureElementCommandsCreate); // create structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AD1", 4, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AD2", 4, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AD3", 4, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AD4", 4, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AD5", 4, "description", "comment") + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AD1", 4, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AD2", 4, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AD3", 4, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AD4", 4, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AD5", 4, "description") }; ITUtilStructures.assertCreate(structureElementCommandsCreate); String description2 = "some other description"; - String comment2 = "some other comment"; String description3 = "more description"; - String comment3 = "more comment"; // create + approve // update + approve // update + approve // delete + reject structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AE1", 5, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AE2", 5, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AE3", 5, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AE4", 5, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AE5", 5, "description", "comment") + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AE1", 5, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AE2", 5, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AE3", 5, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AE4", 5, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AE5", 5, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description2); - structureElementCommandUpdate.setComment(comment2); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description3); - structureElementCommandUpdate.setComment(comment3); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1601,11 +1541,11 @@ class StructuresDisciplineIT { // create + approve // delete + approve structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AF1", 6, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AF2", 6, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AF3", 6, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AF4", 6, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AF5", 6, "description", "comment") + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AF1", 6, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AF2", 6, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AF3", 6, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AF4", 6, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AF5", 6, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1614,11 +1554,11 @@ class StructuresDisciplineIT { // create + approve // delete structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AG1", 7, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AG2", 7, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AG3", 7, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AG4", 7, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AG5", 7, "description", "comment") + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AG1", 7, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AG2", 7, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AG3", 7, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AG4", 7, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AG5", 7, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1632,11 +1572,11 @@ class StructuresDisciplineIT { // delete + reject // delete structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AH1", 8, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AH2", 8, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AH3", 8, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AH4", 8, "description", "comment"), - new StructureElementCommandCreate(Type.DISCIPLINE, null, "AH5", 8, "description", "comment") + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AH1", 8, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AH2", 8, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AH3", 8, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AH4", 8, "description"), + new StructureElementCommandCreate(Type.DISCIPLINE, null, "AH5", 8, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); uuid2 = approvedStructureElements[0].getUuid(); @@ -1644,13 +1584,11 @@ class StructuresDisciplineIT { structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description2); - structureElementCommandUpdate.setComment(comment2); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description3); - structureElementCommandUpdate.setComment(comment3); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); diff --git a/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java b/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java index 901eb97cb73eaf8e2eff663686bf03966f02890d..2b4bc4fd63716d874f6581fb949b2d3185fa8dd4 100644 --- a/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java @@ -69,7 +69,7 @@ class StructuresSubsystemIT { // attributes for entry for operations - create, update, delete, approve, cancel, reject // some set client side, others set server side // client side - // type, uuid, parent uuid, name, mnemonic, description, comment + // type, uuid, parent uuid, name, mnemonic, description // may be set client side for test purposes // order of methods in test not known // therefore mnemonic values chosen to not interfere with mnemonic values in other methods @@ -79,12 +79,12 @@ class StructuresSubsystemIT { // for such operations that send Command objects to backend, it is also possible to send StructureElement // // StructureElementCommand - // create - type, parent, name, mnemonic, description, comment - // update - uuid, type, parent, name, mnemonic, description, comment - // delete - uuid, type, comment - // approve - uuid, type, comment - // cancel - uuid, type, comment - // reject - uuid, type, comment + // create - type, parent, name, mnemonic, description + // update - uuid, type, parent, name, mnemonic, description + // delete - uuid, type + // approve - uuid, type + // cancel - uuid, type + // reject - uuid, type // // response status codes @@ -103,15 +103,13 @@ class StructuresSubsystemIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Sg", null, - "description", "comment"); + "Sg", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemGroupUuid = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Sys", null, - "description", "comment"); + "Sys", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemUuid = approvedStructureElement.getUuid(); @@ -150,7 +148,6 @@ class StructuresSubsystemIT { // name // mnemonic // description - // comment try { StructureElementCommandCreate structureElementCommandCreate = new StructureElementCommandCreate(); @@ -196,10 +193,6 @@ class StructuresSubsystemIT { ITUtilStructures.assertCreate(structureElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); structureElementCommandCreate.setDescription("description"); - ITUtilStructures.assertValidate(structureElementCommandCreate, StructureCommand.CREATE, Boolean.FALSE); - ITUtilStructures.assertCreate(structureElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandCreate.setComment("comment"); ITUtilStructures.assertValidate(structureElementCommandCreate, StructureCommand.CREATE, Boolean.TRUE); structureElementCommandCreate.setType(null); @@ -227,7 +220,6 @@ class StructuresSubsystemIT { structureElementCommandCreate.setType(Type.SUBSYSTEM); structureElementCommandCreate.setParent(systemUuid); structureElementCommandCreate.setDescription("description"); - structureElementCommandCreate.setComment("comment"); // mnemonic rules @@ -352,8 +344,7 @@ class StructuresSubsystemIT { structureElementCommand = new StructureElementCommand( null, Type.SUBSYSTEM, systemUuid, - "Ca", null, - "description", "comment"); + "Ca", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -413,8 +404,7 @@ class StructuresSubsystemIT { structureElementCommand = new StructureElementCommand( null, Type.SUBSYSTEM, systemUuid, - "Cc", null, - "description", "comment"); + "Cc", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -479,8 +469,7 @@ class StructuresSubsystemIT { structureElementCommand = new StructureElementCommand( null, Type.SUBSYSTEM, systemUuid, - "Cr", null, - "description", "comment"); + "Cr", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -546,7 +535,6 @@ class StructuresSubsystemIT { // name // mnemonic // description - // comment try { UUID uuid = null; @@ -558,8 +546,7 @@ class StructuresSubsystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "Cu", null, - "description", "comment"); + "Cu", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); uuid = approvedStructureElement.getUuid(); @@ -613,13 +600,6 @@ class StructuresSubsystemIT { structureElementCommandUpdate.setDescription("description"); ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); - - structureElementCommandUpdate.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.FALSE); - ITUtilStructures.assertUpdate(structureElementCommandUpdate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandUpdate.setComment("comment"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -650,14 +630,11 @@ class StructuresSubsystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "Ua", null, - "description", "comment"); + "Ua", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update approve check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.APPROVE, Boolean.FALSE); @@ -712,14 +689,11 @@ class StructuresSubsystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "Uc", null, - "description", "comment"); + "Uc", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update cancel check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); @@ -774,14 +748,11 @@ class StructuresSubsystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "Ur", null, - "description", "comment"); + "Ur", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update reject check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.REJECT, Boolean.FALSE); @@ -828,7 +799,6 @@ class StructuresSubsystemIT { // validate delete // uuid // type - // comment try { UUID uuid = null; @@ -840,8 +810,7 @@ class StructuresSubsystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "Cd", null, - "description", "comment"); + "Cd", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); uuid = approvedStructureElement.getUuid(); @@ -871,13 +840,6 @@ class StructuresSubsystemIT { structureElementCommandConfirm.setType(Type.SUBSYSTEM); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); - - structureElementCommandConfirm.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.FALSE); - ITUtilStructures.assertDelete(structureElementCommandConfirm, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandConfirm.setComment("comment"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -907,13 +869,10 @@ class StructuresSubsystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "Da", null, - "description", "comment"); + "Da", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment delete approve check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.APPROVE, Boolean.FALSE); @@ -967,13 +926,10 @@ class StructuresSubsystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "Dc", null, - "description", "comment"); + "Dc", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment update delete check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); @@ -1027,13 +983,10 @@ class StructuresSubsystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "Dr", null, - "description", "comment"); + "Dr", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment delete reject check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.REJECT, Boolean.FALSE); @@ -1081,8 +1034,7 @@ class StructuresSubsystemIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "Rsha", 41, - "description", "comment"); + "Rsha", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1207,8 +1159,7 @@ class StructuresSubsystemIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "Rshc", 41, - "description", "comment"); + "Rshc", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1333,8 +1284,7 @@ class StructuresSubsystemIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "Rshr", 41, - "description", "comment"); + "Rshr", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1470,32 +1420,28 @@ class StructuresSubsystemIT { // a number of entries for which the last entry has status PENDING structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "P1", 1, - "description", "comment"); + "P1", 1, "description"); createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); uuid = createdStructureElement.getUuid(); // a number of entries for which the last entry has status CANCELLED structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "C1", 2, - "description", "comment"); + "C1", 2, "description"); createdStructureElement = ITUtilStructures.assertCreateCancel(structureElementCommandCreate); uuid2 = createdStructureElement.getUuid(); // a number of entries for which the last entry has status REJECTED structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "R1", 3, - "description", "comment"); + "R1", 3, "description"); createdStructureElement = ITUtilStructures.assertCreateReject(structureElementCommandCreate); uuid3 = createdStructureElement.getUuid(); // a number of entries for which the last entry has status APPROVED structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "A1", 4, - "description", "comment"); + "A1", 4, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); uuid4 = createdStructureElement.getUuid(); @@ -1571,105 +1517,101 @@ class StructuresSubsystemIT { // a number of entries for which the last entry has status PENDING structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "P9", null, - "description", "comment"); + "P9", null, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdate(structureElementCommandUpdate); // a number of entries for which the last entry has status CANCELLED structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "C9", 2, - "description", "comment"); + "C9", 2, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid2 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); // a number of entries for which the last entry has status REJECTED structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "R9", 1, - "description", "comment"); + "R9", 1, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid3 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); // a number of entries for which the last entry has status APPROVED structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "A9", 1, - "description", "comment"); + "A9", 1, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid4 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); try { @@ -1746,73 +1688,69 @@ class StructuresSubsystemIT { // create + approve structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AA1", 1, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AA2", 1, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AA3", 1, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AA4", 1, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AA5", 1, "description", "comment") + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AA1", 1, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AA2", 1, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AA3", 1, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AA4", 1, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AA5", 1, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); uuid = approvedStructureElements[0].getUuid(); // create + cancel structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AB1", 2, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AB2", 2, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AB3", 2, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AB4", 2, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AB5", 2, "description", "comment") + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AB1", 2, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AB2", 2, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AB3", 2, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AB4", 2, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AB5", 2, "description") }; ITUtilStructures.assertCreateCancel(structureElementCommandsCreate); // create + reject structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AC1", 3, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AC2", 3, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AC3", 3, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AC4", 3, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AC5", 3, "description", "comment") + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AC1", 3, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AC2", 3, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AC3", 3, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AC4", 3, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AC5", 3, "description") }; ITUtilStructures.assertCreateReject(structureElementCommandsCreate); // create structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AD1", 4, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AD2", 4, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AD3", 4, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AD4", 4, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AD5", 4, "description", "comment") + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AD1", 4, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AD2", 4, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AD3", 4, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AD4", 4, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AD5", 4, "description") }; ITUtilStructures.assertCreate(structureElementCommandsCreate); String description2 = "some other description"; - String comment2 = "some other comment"; String description3 = "more description"; - String comment3 = "more comment"; // create + approve // update + approve // update + approve // delete + reject structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AE1", 5, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AE2", 5, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AE3", 5, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AE4", 5, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AE5", 5, "description", "comment") + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AE1", 5, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AE2", 5, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AE3", 5, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AE4", 5, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AE5", 5, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description2); - structureElementCommandUpdate.setComment(comment2); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description3); - structureElementCommandUpdate.setComment(comment3); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1821,11 +1759,11 @@ class StructuresSubsystemIT { // create + approve // delete + approve structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AF1", 6, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AF2", 6, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AF3", 6, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AF4", 6, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AF5", 6, "description", "comment") + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AF1", 6, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AF2", 6, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AF3", 6, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AF4", 6, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AF5", 6, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1834,11 +1772,11 @@ class StructuresSubsystemIT { // create + approve // delete structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AG1", 7, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AG2", 7, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AG3", 7, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AG4", 7, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AG5", 7, "description", "comment") + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AG1", 7, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AG2", 7, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AG3", 7, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AG4", 7, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AG5", 7, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1852,11 +1790,11 @@ class StructuresSubsystemIT { // delete + reject // delete structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AH1", 8, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AH2", 8, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AH3", 8, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AH4", 8, "description", "comment"), - new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AH5", 8, "description", "comment") + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AH1", 8, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AH2", 8, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AH3", 8, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AH4", 8, "description"), + new StructureElementCommandCreate(Type.SUBSYSTEM, systemUuid, "AH5", 8, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); uuid2 = approvedStructureElements[0].getUuid(); @@ -1864,13 +1802,11 @@ class StructuresSubsystemIT { structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description2); - structureElementCommandUpdate.setComment(comment2); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description3); - structureElementCommandUpdate.setComment(comment3); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); diff --git a/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java b/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java index 98359237c1c191b5e479ca368ce2cee14bf0d554..0609c7ae7673861f2c107c9b229003bd3e736482 100644 --- a/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java @@ -69,7 +69,7 @@ class StructuresSystemGroupIT { // attributes for entry for operations - create, update, delete, approve, cancel, reject // some set client side, others set server side // client side - // type, uuid, parent uuid, name, mnemonic, description, comment + // type, uuid, parent uuid, name, mnemonic, description // may be set client side for test purposes // order of methods in test not known // therefore mnemonic values chosen to not interfere with mnemonic values in other methods @@ -79,12 +79,12 @@ class StructuresSystemGroupIT { // for such operations that send Command objects to backend, it is also possible to send StructureElement // // StructureElementCommand - // create - type, parent, name, mnemonic, description, comment - // update - uuid, type, parent, name, mnemonic, description, comment - // delete - uuid, type, comment - // approve - uuid, type, comment - // cancel - uuid, type, comment - // reject - uuid, type, comment + // create - type, parent, name, mnemonic, description + // update - uuid, type, parent, name, mnemonic, description + // delete - uuid, type + // approve - uuid, type + // cancel - uuid, type + // reject - uuid, type @Container public static final ComposeContainer ENVIRONMENT = ITUtil.defaultComposeContainers(); @@ -115,7 +115,6 @@ class StructuresSystemGroupIT { // name // mnemonic // description - // comment try { StructureElementCommandCreate structureElementCommandCreate = new StructureElementCommandCreate(); @@ -146,10 +145,6 @@ class StructuresSystemGroupIT { ITUtilStructures.assertCreate(structureElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); structureElementCommandCreate.setDescription("description"); - ITUtilStructures.assertValidate(structureElementCommandCreate, StructureCommand.CREATE, Boolean.FALSE); - ITUtilStructures.assertCreate(structureElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandCreate.setComment("comment"); ITUtilStructures.assertValidate(structureElementCommandCreate, StructureCommand.CREATE, Boolean.TRUE); structureElementCommandCreate.setMnemonic(""); @@ -182,7 +177,6 @@ class StructuresSystemGroupIT { structureElementCommandCreate.setType(Type.SYSTEMGROUP); structureElementCommandCreate.setDescription("description"); - structureElementCommandCreate.setComment("comment"); // mnemonic rules @@ -317,8 +311,7 @@ class StructuresSystemGroupIT { structureElementCommand = new StructureElementCommand( null, Type.SYSTEMGROUP, null, - "Ca", null, - "description", "comment"); + "Ca", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -356,16 +349,14 @@ class StructuresSystemGroupIT { // create structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - null, null, - "description2", "comment2"); + null, null, "description2"); createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); uuid2 = createdStructureElement.getUuid(); // create structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - null, null, - "description3", "comment3"); + null, null, "description3"); createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); uuid3 = createdStructureElement.getUuid(); @@ -399,8 +390,7 @@ class StructuresSystemGroupIT { structureElementCommand = new StructureElementCommand( null, Type.SYSTEMGROUP, null, - "Cc", null, - "description", "comment"); + "Cc", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -429,11 +419,6 @@ class StructuresSystemGroupIT { ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); structureElementCommandConfirm.setType(Type.SYSTEMGROUP); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.TRUE); - structureElementCommandConfirm.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); - structureElementCommandConfirm.setComment("comment"); - // cancel ITUtilStructures.assertCancel(structureElementCommandConfirm); @@ -475,8 +460,7 @@ class StructuresSystemGroupIT { structureElementCommand = new StructureElementCommand( null, Type.SYSTEMGROUP, null, - "Cr", null, - "description", "comment"); + "Cr", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -541,7 +525,6 @@ class StructuresSystemGroupIT { // name // mnemonic // description - // comment try { UUID uuid = null; @@ -553,8 +536,7 @@ class StructuresSystemGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Cu", null, - "description", "comment"); + "Cu", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); uuid = approvedStructureElement.getUuid(); @@ -600,13 +582,6 @@ class StructuresSystemGroupIT { structureElementCommandUpdate.setDescription("description"); ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); - - structureElementCommandUpdate.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.FALSE); - ITUtilStructures.assertUpdate(structureElementCommandUpdate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandUpdate.setComment("comment"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -637,14 +612,12 @@ class StructuresSystemGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Ua", null, - "description", "comment"); + "Ua", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); structureElementCommandUpdate.setDescription("description update approve check"); - structureElementCommandUpdate.setComment("comment update approve check"); ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.APPROVE, Boolean.FALSE); @@ -700,14 +673,12 @@ class StructuresSystemGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Uc", null, - "description", "comment"); + "Uc", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); structureElementCommandUpdate.setDescription("description update cancel check"); - structureElementCommandUpdate.setComment("comment update cancel check"); ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); @@ -763,14 +734,12 @@ class StructuresSystemGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Ur", null, - "description", "comment"); + "Ur", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); structureElementCommandUpdate.setDescription("description update reject check"); - structureElementCommandUpdate.setComment("comment update reject check"); ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.REJECT, Boolean.FALSE); @@ -818,7 +787,6 @@ class StructuresSystemGroupIT { // validate delete // uuid // type - // comment try { UUID uuid = null; @@ -830,8 +798,7 @@ class StructuresSystemGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Cd", null, - "description", "comment"); + "Cd", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); uuid = approvedStructureElement.getUuid(); @@ -861,13 +828,6 @@ class StructuresSystemGroupIT { structureElementCommandConfirm.setType(Type.SYSTEMGROUP); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); - - structureElementCommandConfirm.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.FALSE); - ITUtilStructures.assertDelete(structureElementCommandConfirm, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandConfirm.setComment("comment"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -897,13 +857,10 @@ class StructuresSystemGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Da", null, - "description", "comment"); + "Da", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment delete approve check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.APPROVE, Boolean.FALSE); @@ -957,13 +914,10 @@ class StructuresSystemGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Dc", null, - "description", "comment"); + "Dc", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment update delete check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); @@ -1017,13 +971,10 @@ class StructuresSystemGroupIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Dr", null, - "description", "comment"); + "Dr", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment delete reject check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.REJECT, Boolean.FALSE); @@ -1071,8 +1022,7 @@ class StructuresSystemGroupIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Rsha", 41, - "description", "comment"); + "Rsha", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1153,8 +1103,7 @@ class StructuresSystemGroupIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Rshc", 41, - "description", "comment"); + "Rshc", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1235,8 +1184,7 @@ class StructuresSystemGroupIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Rshr", 41, - "description", "comment"); + "Rshr", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1328,32 +1276,28 @@ class StructuresSystemGroupIT { // a number of entries for which the last entry has status PENDING structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "P1", 1, - "description", "comment"); + "P1", 1, "description"); createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); uuid = createdStructureElement.getUuid(); // a number of entries for which the last entry has status CANCELLED structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "C1", 2, - "description", "comment"); + "C1", 2, "description"); createdStructureElement = ITUtilStructures.assertCreateCancel(structureElementCommandCreate); uuid2 = createdStructureElement.getUuid(); // a number of entries for which the last entry has status REJECTED structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "R1", 3, - "description", "comment"); + "R1", 3, "description"); createdStructureElement = ITUtilStructures.assertCreateReject(structureElementCommandCreate); uuid3 = createdStructureElement.getUuid(); // a number of entries for which the last entry has status APPROVED structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "A1", 4, - "description", "comment"); + "A1", 4, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); uuid4 = createdStructureElement.getUuid(); @@ -1421,105 +1365,101 @@ class StructuresSystemGroupIT { // a number of entries for which the last entry has status PENDING structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "P9", null, - "description", "comment"); + "P9", null, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdate(structureElementCommandUpdate); // a number of entries for which the last entry has status CANCELLED structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "C9", 2, - "description", "comment"); + "C9", 2, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid2 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); // a number of entries for which the last entry has status REJECTED structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "R9", 1, - "description", "comment"); + "R9", 1, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid3 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); // a number of entries for which the last entry has status APPROVED structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "A9", 1, - "description", "comment"); + "A9", 1, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid4 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); try { @@ -1588,73 +1528,69 @@ class StructuresSystemGroupIT { // create + approve structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AA1", 1, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AA2", 1, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AA3", 1, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AA4", 1, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AA5", 1, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AA1", 1, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AA2", 1, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AA3", 1, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AA4", 1, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AA5", 1, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); uuid = approvedStructureElements[0].getUuid(); // create + cancel structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AB1", 2, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AB2", 2, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AB3", 2, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AB4", 2, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AB5", 2, "description", "comment"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AB1", 2, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AB2", 2, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AB3", 2, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AB4", 2, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AB5", 2, "description"), }; ITUtilStructures.assertCreateCancel(structureElementCommandsCreate); // create + reject structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AC1", 3, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AC2", 3, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AC3", 3, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AC4", 3, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AC5", 3, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AC1", 3, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AC2", 3, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AC3", 3, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AC4", 3, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AC5", 3, "description") }; ITUtilStructures.assertCreateReject(structureElementCommandsCreate); // create structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AD1", 4, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AD2", 4, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AD3", 4, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AD4", 4, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AD5", 4, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AD1", 4, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AD2", 4, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AD3", 4, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AD4", 4, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AD5", 4, "description") }; ITUtilStructures.assertCreate(structureElementCommandsCreate); String description2 = "some other description"; - String comment2 = "some other comment"; String description3 = "more description"; - String comment3 = "more comment"; // create + approve // update + approve // update + approve // delete + reject structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AE1", 5, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AE2", 5, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AE3", 5, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AE4", 5, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AE5", 5, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AE1", 5, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AE2", 5, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AE3", 5, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AE4", 5, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AE5", 5, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description2); - structureElementCommandUpdate.setComment(comment2); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description3); - structureElementCommandUpdate.setComment(comment3); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1663,11 +1599,11 @@ class StructuresSystemGroupIT { // create + approve // delete + approve structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AF1", 6, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AF2", 6, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AF3", 6, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AF4", 6, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AF5", 6, "description", "comment"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AF1", 6, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AF2", 6, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AF3", 6, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AF4", 6, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AF5", 6, "description"), }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1676,11 +1612,11 @@ class StructuresSystemGroupIT { // create + approve // delete structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AG1", 7, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AG2", 7, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AG3", 7, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AG4", 7, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AG5", 7, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AG1", 7, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AG2", 7, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AG3", 7, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AG4", 7, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AG5", 7, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1694,11 +1630,11 @@ class StructuresSystemGroupIT { // delete + reject // delete structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AH1", 8, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AH2", 8, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AH3", 8, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AH4", 8, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AH5", 8, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AH1", 8, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AH2", 8, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AH3", 8, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AH4", 8, "description"), + new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "AH5", 8, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); uuid2 = approvedStructureElements[0].getUuid(); @@ -1706,13 +1642,11 @@ class StructuresSystemGroupIT { structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description2); - structureElementCommandUpdate.setComment(comment2); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description3); - structureElementCommandUpdate.setComment(comment3); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); diff --git a/src/test/java/org/openepics/names/docker/StructuresSystemIT.java b/src/test/java/org/openepics/names/docker/StructuresSystemIT.java index 7d6facb0461ae6cbdbbd107f2d299421f042e80c..dfbc26cbcfd272022af33645f3cc69512c7fbd98 100644 --- a/src/test/java/org/openepics/names/docker/StructuresSystemIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresSystemIT.java @@ -69,7 +69,7 @@ class StructuresSystemIT { // attributes for entry for operations - create, update, delete, approve, cancel, reject // some set client side, others set server side // client side - // type, uuid, parent uuid, name, mnemonic, description, comment + // type, uuid, parent uuid, name, mnemonic, description // may be set client side for test purposes // order of methods in test not known // therefore mnemonic values chosen to not interfere with mnemonic values in other methods @@ -79,12 +79,12 @@ class StructuresSystemIT { // for such operations that send Command objects to backend, it is also possible to send StructureElement // // StructureElementCommand - // create - type, parent, name, mnemonic, description, comment - // update - uuid, type, parent, name, mnemonic, description, comment - // delete - uuid, type, comment - // approve - uuid, type, comment - // cancel - uuid, type, comment - // reject - uuid, type, comment + // create - type, parent, name, mnemonic, description + // update - uuid, type, parent, name, mnemonic, description + // delete - uuid, type + // approve - uuid, type + // cancel - uuid, type + // reject - uuid, type // // response status codes @@ -102,8 +102,7 @@ class StructuresSystemIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Sg", null, - "description", "comment"); + "Sg", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemGroupUuid = approvedStructureElement.getUuid(); @@ -141,7 +140,6 @@ class StructuresSystemIT { // name // mnemonic // description - // comment try { StructureElementCommandCreate structureElementCommandCreate = new StructureElementCommandCreate(); @@ -180,10 +178,6 @@ class StructuresSystemIT { ITUtilStructures.assertCreate(structureElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); structureElementCommandCreate.setDescription("description"); - ITUtilStructures.assertValidate(structureElementCommandCreate, StructureCommand.CREATE, Boolean.FALSE); - ITUtilStructures.assertCreate(structureElementCommandCreate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandCreate.setComment("comment"); ITUtilStructures.assertValidate(structureElementCommandCreate, StructureCommand.CREATE, Boolean.TRUE); structureElementCommandCreate.setType(null); @@ -211,7 +205,6 @@ class StructuresSystemIT { structureElementCommandCreate.setType(Type.SYSTEM); structureElementCommandCreate.setParent(systemGroupUuid); structureElementCommandCreate.setDescription("description"); - structureElementCommandCreate.setComment("comment"); // mnemonic rules @@ -335,8 +328,7 @@ class StructuresSystemIT { structureElementCommand = new StructureElementCommand( null, Type.SYSTEM, systemGroupUuid, - "Ca", null, - "description", "comment"); + "Ca", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -396,8 +388,7 @@ class StructuresSystemIT { structureElementCommand = new StructureElementCommand( null, Type.SYSTEM, systemGroupUuid, - "Cc", null, - "description", "comment"); + "Cc", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -462,8 +453,7 @@ class StructuresSystemIT { structureElementCommand = new StructureElementCommand( null, Type.SYSTEM, systemGroupUuid, - "Cr", null, - "description", "comment"); + "Cr", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -529,7 +519,6 @@ class StructuresSystemIT { // name // mnemonic // description - // comment try { UUID uuid = null; @@ -541,8 +530,7 @@ class StructuresSystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Cu", null, - "description", "comment"); + "Cu", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); uuid = approvedStructureElement.getUuid(); @@ -596,13 +584,6 @@ class StructuresSystemIT { structureElementCommandUpdate.setDescription("description"); ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); - - structureElementCommandUpdate.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.FALSE); - ITUtilStructures.assertUpdate(structureElementCommandUpdate, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandUpdate.setComment("comment"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -633,14 +614,11 @@ class StructuresSystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Ua", null, - "description", "comment"); + "Ua", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update approve check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.APPROVE, Boolean.FALSE); @@ -695,14 +673,11 @@ class StructuresSystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Uc", null, - "description", "comment"); + "Uc", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update cancel check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); @@ -757,14 +732,11 @@ class StructuresSystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Ur", null, - "description", "comment"); + "Ur", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElement); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandUpdate.setComment("comment update reject check"); - ITUtilStructures.assertValidate(structureElementCommandUpdate, StructureCommand.UPDATE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.REJECT, Boolean.FALSE); @@ -811,7 +783,6 @@ class StructuresSystemIT { // validate delete // uuid // type - // comment try { UUID uuid = null; @@ -823,8 +794,7 @@ class StructuresSystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Cd", null, - "description", "comment"); + "Cd", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); uuid = approvedStructureElement.getUuid(); @@ -854,13 +824,6 @@ class StructuresSystemIT { structureElementCommandConfirm.setType(Type.SYSTEM); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); - - structureElementCommandConfirm.setComment(null); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.FALSE); - ITUtilStructures.assertDelete(structureElementCommandConfirm, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - - structureElementCommandConfirm.setComment("comment"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -890,13 +853,10 @@ class StructuresSystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Da", null, - "description", "comment"); + "Da", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment delete approve check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.APPROVE, Boolean.FALSE); @@ -950,13 +910,10 @@ class StructuresSystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Dc", null, - "description", "comment"); + "Dc", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment update delete check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.CANCEL, Boolean.FALSE); @@ -1010,13 +967,10 @@ class StructuresSystemIT { // create, approve structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Dr", null, - "description", "comment"); + "Dr", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElement); - structureElementCommandConfirm.setComment("comment delete reject check"); - ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.DELETE, Boolean.TRUE); ITUtilStructures.assertValidate(structureElementCommandConfirm, StructureCommand.REJECT, Boolean.FALSE); @@ -1064,8 +1018,7 @@ class StructuresSystemIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Rsha", 41, - "description", "comment"); + "Rsha", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1164,8 +1117,7 @@ class StructuresSystemIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Rshc", 41, - "description", "comment"); + "Rshc", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1264,8 +1216,7 @@ class StructuresSystemIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Rshr", 41, - "description", "comment"); + "Rshr", 41, "description"); // create createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); @@ -1375,32 +1326,28 @@ class StructuresSystemIT { // a number of entries for which the last entry has status PENDING structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "P1", 1, - "description", "comment"); + "P1", 1, "description"); createdStructureElement = ITUtilStructures.assertCreate(structureElementCommandCreate); uuid = createdStructureElement.getUuid(); // a number of entries for which the last entry has status CANCELLED structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "C1", 2, - "description", "comment"); + "C1", 2, "description"); createdStructureElement = ITUtilStructures.assertCreateCancel(structureElementCommandCreate); uuid2 = createdStructureElement.getUuid(); // a number of entries for which the last entry has status REJECTED structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "R1", 3, - "description", "comment"); + "R1", 3, "description"); createdStructureElement = ITUtilStructures.assertCreateReject(structureElementCommandCreate); uuid3 = createdStructureElement.getUuid(); // a number of entries for which the last entry has status APPROVED structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "A1", 4, - "description", "comment"); + "A1", 4, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); uuid4 = createdStructureElement.getUuid(); @@ -1472,105 +1419,101 @@ class StructuresSystemIT { // a number of entries for which the last entry has status PENDING structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "P9", null, - "description", "comment"); + "P9", null, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdate(structureElementCommandUpdate); // a number of entries for which the last entry has status CANCELLED structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "C9", 2, - "description", "comment"); + "C9", 2, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid2 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); // a number of entries for which the last entry has status REJECTED structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "R9", 1, - "description", "comment"); + "R9", 1, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid3 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); // a number of entries for which the last entry has status APPROVED structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "A9", 1, - "description", "comment"); + "A9", 1, "description"); createdStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); structureElementCommandUpdate = StructureElementUtil.convertElement2CommandUpdate(createdStructureElement); uuid4 = createdStructureElement.getUuid(); - structureElementCommandUpdate.setComment("comment 2"); + structureElementCommandUpdate.setDescription("description 2"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 3"); + structureElementCommandUpdate.setDescription("description 3"); ITUtilStructures.assertUpdateCancel(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 4"); + structureElementCommandUpdate.setDescription("description 4"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 5"); + structureElementCommandUpdate.setDescription("description 5"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 6"); + structureElementCommandUpdate.setDescription("description 6"); ITUtilStructures.assertUpdateReject(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 7"); + structureElementCommandUpdate.setDescription("description 7"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 8"); + structureElementCommandUpdate.setDescription("description 8"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); - structureElementCommandUpdate.setComment("comment 9"); + structureElementCommandUpdate.setDescription("description 9"); ITUtilStructures.assertUpdateApprove(structureElementCommandUpdate); try { @@ -1643,73 +1586,69 @@ class StructuresSystemIT { // create + approve structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AA1", 1, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AA2", 1, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AA3", 1, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AA4", 1, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AA5", 1, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AA1", 1, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AA2", 1, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AA3", 1, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AA4", 1, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AA5", 1, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); uuid = approvedStructureElements[0].getUuid(); // create + cancel structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AB1", 2, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AB2", 2, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AB3", 2, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AB4", 2, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AB5", 2, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AB1", 2, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AB2", 2, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AB3", 2, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AB4", 2, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AB5", 2, "description") }; ITUtilStructures.assertCreateCancel(structureElementCommandsCreate); // create + reject structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AC1", 3, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AC2", 3, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AC3", 3, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AC4", 3, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AC5", 3, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AC1", 3, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AC2", 3, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AC3", 3, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AC4", 3, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AC5", 3, "description") }; ITUtilStructures.assertCreateReject(structureElementCommandsCreate); // create structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AD1", 4, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AD2", 4, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AD3", 4, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AD4", 4, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AD5", 4, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AD1", 4, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AD2", 4, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AD3", 4, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AD4", 4, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AD5", 4, "description") }; ITUtilStructures.assertCreate(structureElementCommandsCreate); String description2 = "some other description"; - String comment2 = "some other comment"; String description3 = "more description"; - String comment3 = "more comment"; // create + approve // update + approve // update + approve // delete + reject structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AE1", 5, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AE2", 5, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AE3", 5, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AE4", 5, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AE5", 5, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AE1", 5, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AE2", 5, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AE3", 5, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AE4", 5, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AE5", 5, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description2); - structureElementCommandUpdate.setComment(comment2); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description3); - structureElementCommandUpdate.setComment(comment3); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1718,11 +1657,11 @@ class StructuresSystemIT { // create + approve // delete + approve structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AF1", 6, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AF2", 6, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AF3", 6, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AF4", 6, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AF5", 6, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AF1", 6, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AF2", 6, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AF3", 6, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AF4", 6, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AF5", 6, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1731,11 +1670,11 @@ class StructuresSystemIT { // create + approve // delete structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AG1", 7, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AG2", 7, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AG3", 7, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AG4", 7, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AG5", 7, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AG1", 7, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AG2", 7, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AG3", 7, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AG4", 7, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AG5", 7, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); @@ -1749,11 +1688,11 @@ class StructuresSystemIT { // delete + reject // delete structureElementCommandsCreate = new StructureElementCommandCreate[] { - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AH1", 8, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AH2", 8, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AH3", 8, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AH4", 8, "description", "comment"), - new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AH5", 8, "description", "comment") + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AH1", 8, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AH2", 8, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AH3", 8, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AH4", 8, "description"), + new StructureElementCommandCreate(Type.SYSTEM, systemGroupUuid, "AH5", 8, "description") }; approvedStructureElements = ITUtilStructures.assertCreateApprove(structureElementCommandsCreate); uuid2 = approvedStructureElements[0].getUuid(); @@ -1761,13 +1700,11 @@ class StructuresSystemIT { structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description2); - structureElementCommandUpdate.setComment(comment2); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsUpdate = StructureElementUtil.convertElement2CommandUpdate(approvedStructureElements); for (StructureElementCommandUpdate structureElementCommandUpdate : structureElementCommandsUpdate) { structureElementCommandUpdate.setDescription(description3); - structureElementCommandUpdate.setComment(comment3); } approvedStructureElements = ITUtilStructures.assertUpdateApprove(structureElementCommandsUpdate); structureElementCommandsConfirm = StructureElementUtil.convertElement2CommandConfirm(approvedStructureElements); diff --git a/src/test/java/org/openepics/names/docker/complex/NamesInstanceIndexIT.java b/src/test/java/org/openepics/names/docker/complex/NamesInstanceIndexIT.java index 0279adeef2456e02775d9a2e10ac34d735510701..f1706143060932c3c05da9146b8b333ef53df9a7 100644 --- a/src/test/java/org/openepics/names/docker/complex/NamesInstanceIndexIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesInstanceIndexIT.java @@ -147,36 +147,31 @@ class NamesInstanceIndexIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Acc", null, - "Accelerator. The ESS Linear Accelerator", "approved by alfio"); + "Acc", null, "Accelerator. The ESS Linear Accelerator"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemGroupAcc = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupAcc, - "RFQ", null, - "Radio Frequency Quadrupole", "empty"); + "RFQ", null, "Radio Frequency Quadrupole"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemRFQ = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "010PRL", null, - "01 Phase Reference Line", "Approved by Daniel Piso"); + "010PRL", null, "01 Phase Reference Line"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); subsystem010PRL = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "010", null, - "RFQ-010", "Approved by Daniel Piso"); + "010", null, "RFQ-010"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); subsystem010 = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "N1U1", null, - "Power switch board 01. Electrical power cabinets", "Approved by Daniel Piso"); + "N1U1", null, "Power switch board 01. Electrical power cabinets"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); subsystemN1U1 = approvedStructureElement.getUuid(); @@ -184,57 +179,49 @@ class NamesInstanceIndexIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Cryo", null, - "Cryogenics", "empty"); + "Cryo", null, "Cryogenics"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineCryo = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "EMR", null, - "Electromagnetic Resonators", "empty"); + "EMR", null, "Electromagnetic Resonators"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineEMR = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "HVAC", null, - "Heating, Cooling and Air Conditioning", "empty"); + "HVAC", null, "Heating, Cooling and Air Conditioning"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineHVAC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Proc", null, - "General Process Control", "empty"); + "Proc", null, "General Process Control"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineProc = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "SC", null, - "Software Controllers", "empty"); + "SC", null, "Software Controllers"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineSC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Vac", null, - "Vacuum", "empty"); + "Vac", null, "Vacuum"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineVac = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "WtrC", null, - "Water Cooling", "empty"); + "WtrC", null, "Water Cooling"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineWtrC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "BMD", null, - "Beam Magnets and Deflectors", "empty"); + "BMD", null, "Beam Magnets and Deflectors"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineBMD = approvedStructureElement.getUuid(); @@ -243,57 +230,49 @@ class NamesInstanceIndexIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineCryo, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupCryo = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineEMR, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupEMR = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineHVAC, - null, null, - "empty, empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupHVAC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineProc, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupProc = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineSC, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupSC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineVac, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupVac = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineWtrC, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupWtrC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineBMD, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupBMD = approvedStructureElement.getUuid(); @@ -301,29 +280,25 @@ class NamesInstanceIndexIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupCryo, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Cryo_FS = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupCryo, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Cryo_IOC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupCryo, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Cryo_RFA = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupCryo, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Cryo_TT = approvedStructureElement.getUuid(); @@ -331,29 +306,25 @@ class NamesInstanceIndexIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_EMR_FS = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_EMR_IOC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_EMR_RFA = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_EMR_TT = approvedStructureElement.getUuid(); @@ -361,29 +332,25 @@ class NamesInstanceIndexIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupHVAC, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_HVAC_FS = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupHVAC, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_HVAC_IOC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupHVAC, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_HVAC_RFA = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupHVAC, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_HVAC_TT = approvedStructureElement.getUuid(); @@ -391,29 +358,25 @@ class NamesInstanceIndexIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupProc, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Proc_FS = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupProc, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Proc_IOC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupProc, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Proc_RFA = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupProc, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Proc_TT = approvedStructureElement.getUuid(); @@ -421,29 +384,25 @@ class NamesInstanceIndexIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupSC, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_SC_FS = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupSC, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_SC_IOC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupSC, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_SC_RFA = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupSC, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_SC_TT = approvedStructureElement.getUuid(); @@ -451,29 +410,25 @@ class NamesInstanceIndexIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupVac, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Vac_FS = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupVac, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Vac_IOC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupVac, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Vac_RFA = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupVac, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Vac_TT = approvedStructureElement.getUuid(); @@ -481,29 +436,25 @@ class NamesInstanceIndexIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupWtrC, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_WtrC_FS = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupWtrC, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_WtrC_IOC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupWtrC, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_WtrC_RFA = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupWtrC, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_WtrC_TT = approvedStructureElement.getUuid(); @@ -511,29 +462,25 @@ class NamesInstanceIndexIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupBMD, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_BMD_FS = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupBMD, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_BMD_IOC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupBMD, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_BMD_RFA = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupBMD, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_BMD_TT = approvedStructureElement.getUuid(); } @@ -561,7 +508,6 @@ class NamesInstanceIndexIT { NameElementCommandCreate nameElementCommandCreate = new NameElementCommandCreate(); nameElementCommandCreate.setParentSystemStructure(subsystem010PRL); nameElementCommandCreate.setDescription("description"); - nameElementCommandCreate.setComment("comment"); // ---------------------------------------------------------------------------------------------------- @@ -700,7 +646,6 @@ class NamesInstanceIndexIT { NameElementCommandCreate nameElementCommandCreate = new NameElementCommandCreate(); nameElementCommandCreate.setParentSystemStructure(subsystem010PRL); nameElementCommandCreate.setDescription("description"); - nameElementCommandCreate.setComment("comment"); // ---------------------------------------------------------------------------------------------------- @@ -839,7 +784,6 @@ class NamesInstanceIndexIT { NameElementCommandCreate nameElementCommandCreate = new NameElementCommandCreate(); nameElementCommandCreate.setParentSystemStructure(subsystem010PRL); nameElementCommandCreate.setDescription("description"); - nameElementCommandCreate.setComment("comment"); // ---------------------------------------------------------------------------------------------------- @@ -978,7 +922,6 @@ class NamesInstanceIndexIT { NameElementCommandCreate nameElementCommandCreate = new NameElementCommandCreate(); nameElementCommandCreate.setParentSystemStructure(subsystem010PRL); nameElementCommandCreate.setDescription("description"); - nameElementCommandCreate.setComment("comment"); // ---------------------------------------------------------------------------------------------------- @@ -1117,7 +1060,6 @@ class NamesInstanceIndexIT { NameElementCommandCreate nameElementCommandCreate = new NameElementCommandCreate(); nameElementCommandCreate.setParentSystemStructure(subsystem010PRL); nameElementCommandCreate.setDescription("description"); - nameElementCommandCreate.setComment("comment"); // ---------------------------------------------------------------------------------------------------- @@ -1256,7 +1198,6 @@ class NamesInstanceIndexIT { NameElementCommandCreate nameElementCommandCreate = new NameElementCommandCreate(); nameElementCommandCreate.setParentSystemStructure(subsystem010PRL); nameElementCommandCreate.setDescription("description"); - nameElementCommandCreate.setComment("comment"); // ---------------------------------------------------------------------------------------------------- @@ -1395,7 +1336,6 @@ class NamesInstanceIndexIT { NameElementCommandCreate nameElementCommandCreate = new NameElementCommandCreate(); nameElementCommandCreate.setParentSystemStructure(subsystem010PRL); nameElementCommandCreate.setDescription("description"); - nameElementCommandCreate.setComment("comment"); // ---------------------------------------------------------------------------------------------------- @@ -1534,7 +1474,6 @@ class NamesInstanceIndexIT { NameElementCommandCreate nameElementCommandCreate = new NameElementCommandCreate(); nameElementCommandCreate.setParentSystemStructure(subsystem010PRL); nameElementCommandCreate.setDescription("description"); - nameElementCommandCreate.setComment("comment"); // ---------------------------------------------------------------------------------------------------- diff --git a/src/test/java/org/openepics/names/docker/complex/NamesLegacyIT.java b/src/test/java/org/openepics/names/docker/complex/NamesLegacyIT.java index 777ac3b584b29bc29a240f3cac4e764fef83076a..39016393059cb990bd042452d290fdd914a40a29 100644 --- a/src/test/java/org/openepics/names/docker/complex/NamesLegacyIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesLegacyIT.java @@ -122,10 +122,9 @@ class NamesLegacyIT { StructureElement approvedStructureElement = null; String description = "description"; - String comment = "comment"; // sg0 - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, null, null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, null, null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); ITUtilStructures.assertRead("", 1); @@ -138,48 +137,48 @@ class NamesLegacyIT { // system group // sg0 - no mnemonic - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "Sg1", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "Sg1", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sg1 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys11", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys11", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys11 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys12", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys12", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys12 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys13", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys13", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys13 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub111", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub111", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub112", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub112", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub113", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub113", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub121", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub121", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub122", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub122", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub123", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub123", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub131", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub131", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub132", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub132", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sub132 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub133", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub133", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); ITUtilStructures.assertRead("", 14); @@ -206,49 +205,49 @@ class NamesLegacyIT { // Sys12-Sub121, Sys12-Sub122, Sys12-Sub123 // Sys13-Sub131, Sys13-Sub132, Sys13-Sub133 - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "Sg2", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "Sg2", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sg2 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys21", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys21", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys21 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys22", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys22", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys22 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys23", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys23", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys23 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub211", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub211", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub212", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub212", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub213", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub213", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub221", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub221", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub222", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub222", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub223", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub223", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub231", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub231", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sub231 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub232", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub232", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sub232 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub233", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub233", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sub233 = approvedStructureElement.getUuid(); @@ -276,55 +275,55 @@ class NamesLegacyIT { // Sys22-Sub221, Sys22-Sub222, Sys22-Sub223 // Sys23-Sub231, Sys23-Sub232, Sys23-Sub233 - structureElementCommandCreate = new StructureElementCommandCreate(Type.DISCIPLINE, null, "Di2", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DISCIPLINE, null, "Di2", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); di2 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dg21 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dg22 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dg23 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt211", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt211", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt211 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt212", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt212", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt212 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt213", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt213", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt213 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt221", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt221", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt221 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt222", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt222", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt222 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt223", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt223", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt223 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt231", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt231", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt231 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt232", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt232", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt232 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt233", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt233", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt233 = approvedStructureElement.getUuid(); @@ -349,31 +348,31 @@ class NamesLegacyIT { // Dt221, Dt222, Dt223 // Dt231, Dt232, Dt233 - nameElementCommandCreate = new NameElementCommandCreate(sg2, dt211, "211", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sg2, dt211, "211", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sg2, dt212, "212", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sg2, dt212, "212", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sg2, dt213, "213", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sg2, dt213, "213", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sys22, dt221, "221", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sys22, dt221, "221", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sys22, dt222, "222", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sys22, dt222, "222", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sys22, dt223, "223", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sys22, dt223, "223", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sub231, dt231, "231", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sub231, dt231, "231", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sub232, dt232, "232", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sub232, dt232, "232", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sub233, dt233, "233", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sub233, dt233, "233", description); ITUtilNames.assertCreate(nameElementCommandCreate); ITUtilStructures.assertRead("", 40); diff --git a/src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresDeleteIT.java b/src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresDeleteIT.java index 2a32a216665066f3da8e6378bea51de48bc69573..e44db19e9e26da6a240cc61cd633ae5de74f49db 100644 --- a/src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresDeleteIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresDeleteIT.java @@ -120,10 +120,9 @@ class NamesLegacyStructuresDeleteIT { StructureElement approvedStructureElement = null; String description = "description"; - String comment = "comment"; // sg0 - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, null, null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, null, null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); ITUtilStructures.assertRead("", 1); @@ -136,48 +135,48 @@ class NamesLegacyStructuresDeleteIT { // system group // sg0 - no mnemonic - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "Sg1", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "Sg1", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sg1 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys11", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys11", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys11 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys12", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys12", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys12 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys13", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys13", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys13 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub111", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub111", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub112", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub112", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub113", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub113", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub121", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub121", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub122", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub122", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub123", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub123", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub131", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub131", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub132", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub132", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sub132 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub133", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub133", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); ITUtilStructures.assertRead("", 14); @@ -204,49 +203,49 @@ class NamesLegacyStructuresDeleteIT { // Sys12-Sub121, Sys12-Sub122, Sys12-Sub123 // Sys13-Sub131, Sys13-Sub132, Sys13-Sub133 - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "Sg2", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "Sg2", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sg2 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys21", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys21", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys21 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys22", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys22", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys22 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys23", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys23", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys23 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub211", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub211", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub212", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub212", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub213", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub213", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub221", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub221", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub222", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub222", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub223", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub223", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub231", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub231", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sub231 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub232", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub232", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sub232 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub233", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub233", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sub233 = approvedStructureElement.getUuid(); @@ -274,55 +273,55 @@ class NamesLegacyStructuresDeleteIT { // Sys22-Sub221, Sys22-Sub222, Sys22-Sub223 // Sys23-Sub231, Sys23-Sub232, Sys23-Sub233 - structureElementCommandCreate = new StructureElementCommandCreate(Type.DISCIPLINE, null, "Di2", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DISCIPLINE, null, "Di2", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); di2 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dg21 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dg22 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dg23 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt211", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt211", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt211 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt212", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt212", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt212 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt213", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt213", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt213 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt221", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt221", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt221 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt222", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt222", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt222 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt223", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt223", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt223 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt231", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt231", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt231 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt232", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt232", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt232 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt233", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt233", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt233 = approvedStructureElement.getUuid(); @@ -347,31 +346,31 @@ class NamesLegacyStructuresDeleteIT { // Dt221, Dt222, Dt223 // Dt231, Dt232, Dt233 - nameElementCommandCreate = new NameElementCommandCreate(sg2, dt211, "211", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sg2, dt211, "211", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sg2, dt212, "212", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sg2, dt212, "212", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sg2, dt213, "213", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sg2, dt213, "213", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sys22, dt221, "221", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sys22, dt221, "221", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sys22, dt222, "222", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sys22, dt222, "222", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sys22, dt223, "223", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sys22, dt223, "223", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sub231, dt231, "231", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sub231, dt231, "231", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sub232, dt232, "232", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sub232, dt232, "232", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sub233, dt233, "233", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sub233, dt233, "233", description); ITUtilNames.assertCreate(nameElementCommandCreate); ITUtilStructures.assertRead("", 40); diff --git a/src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresUpdateIT.java b/src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresUpdateIT.java index d6724d353b4c8f67ee1665f654aa41b21a35dabd..01c0385a9bb531996bdd864459d8fb5d25773314 100644 --- a/src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresUpdateIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresUpdateIT.java @@ -120,10 +120,9 @@ class NamesLegacyStructuresUpdateIT { StructureElement approvedStructureElement = null; String description = "description"; - String comment = "comment"; // sg0 - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, null, null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, null, null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); ITUtilStructures.assertRead("", 1); @@ -136,48 +135,48 @@ class NamesLegacyStructuresUpdateIT { // system group // sg0 - no mnemonic - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "Sg1", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "Sg1", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sg1 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys11", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys11", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys11 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys12", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys12", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys12 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys13", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg1, "Sys13", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys13 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub111", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub111", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub112", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub112", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub113", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys11, "Sub113", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub121", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub121", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub122", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub122", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub123", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys12, "Sub123", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub131", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub131", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub132", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub132", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sub132 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub133", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys13, "Sub133", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); ITUtilStructures.assertRead("", 14); @@ -205,49 +204,49 @@ class NamesLegacyStructuresUpdateIT { // Sys12-Sub121, Sys12-Sub122, Sys12-Sub123 // Sys13-Sub131, Sys13-Sub132, Sys13-Sub133 - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "Sg2", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEMGROUP, null, "Sg2", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sg2 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys21", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys21", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys21 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys22", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys22", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys22 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys23", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SYSTEM, sg2, "Sys23", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sys23 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub211", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub211", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub212", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub212", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub213", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys21, "Sub213", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub221", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub221", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub222", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub222", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub223", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys22, "Sub223", null, description); ITUtilStructures.assertCreateApprove(structureElementCommandCreate); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub231", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub231", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sub231 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub232", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub232", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sub232 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub233", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.SUBSYSTEM, sys23, "Sub233", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); sub233 = approvedStructureElement.getUuid(); @@ -275,55 +274,55 @@ class NamesLegacyStructuresUpdateIT { // Sys22-Sub221, Sys22-Sub222, Sys22-Sub223 // Sys23-Sub231, Sys23-Sub232, Sys23-Sub233 - structureElementCommandCreate = new StructureElementCommandCreate(Type.DISCIPLINE, null, "Di2", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DISCIPLINE, null, "Di2", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); di2 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dg21 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dg22 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICEGROUP, di2, "", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dg23 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt211", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt211", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt211 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt212", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt212", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt212 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt213", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg21, "Dt213", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt213 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt221", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt221", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt221 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt222", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt222", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt222 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt223", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg22, "Dt223", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt223 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt231", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt231", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt231 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt232", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt232", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt232 = approvedStructureElement.getUuid(); - structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt233", null, description, comment); + structureElementCommandCreate = new StructureElementCommandCreate(Type.DEVICETYPE, dg23, "Dt233", null, description); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); dt233 = approvedStructureElement.getUuid(); @@ -348,31 +347,31 @@ class NamesLegacyStructuresUpdateIT { // Dt221, Dt222, Dt223 // Dt231, Dt232, Dt233 - nameElementCommandCreate = new NameElementCommandCreate(sg2, dt211, "211", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sg2, dt211, "211", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sg2, dt212, "212", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sg2, dt212, "212", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sg2, dt213, "213", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sg2, dt213, "213", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sys22, dt221, "221", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sys22, dt221, "221", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sys22, dt222, "222", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sys22, dt222, "222", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sys22, dt223, "223", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sys22, dt223, "223", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sub231, dt231, "231", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sub231, dt231, "231", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sub232, dt232, "232", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sub232, dt232, "232", description); ITUtilNames.assertCreate(nameElementCommandCreate); - nameElementCommandCreate = new NameElementCommandCreate(sub233, dt233, "233", description, comment); + nameElementCommandCreate = new NameElementCommandCreate(sub233, dt233, "233", description); ITUtilNames.assertCreate(nameElementCommandCreate); ITUtilStructures.assertRead("", 40); diff --git a/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java b/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java index 42672e6119479826c9e1035893019711602ab031..6fe8f70cc25724b8646d067a006212f9fa5f9a89 100644 --- a/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java @@ -59,12 +59,12 @@ import org.testcontainers.junit.jupiter.Testcontainers; class NamesMultipleIT { // names for each of - // system group + description + comment - // system group + device type + index + description + comment - // system + description + comment - // system + device type + index + description + comment - // subsystem + description + comment - // subsystem + device type + index + description + comment + // system group + description + // system group + device type + index + description + // system + description + // system + device type + index + description + // subsystem + description + // subsystem + device type + index + description @Container public static final ComposeContainer ENVIRONMENT = ITUtil.defaultComposeContainers(); @@ -86,43 +86,37 @@ class NamesMultipleIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Acc", null, - "Accelerator. The ESS Linear Accelerator", "approved by alfio"); + "Acc", null, "Accelerator. The ESS Linear Accelerator"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemGroupAcc = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupAcc, - "RFQ", null, - "Radio Frequency Quadrupole", "empty"); + "RFQ", null, "Radio Frequency Quadrupole"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemRFQ = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "010PRL", null, - "01 Phase Reference Line", "Approved by Daniel Piso"); + "010PRL", null, "01 Phase Reference Line"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); subsystem010PRL = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Cryo", null, - "Cryogenics", "empty"); + "Cryo", null, "Cryogenics"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineCryo = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineCryo, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupCryo = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupCryo, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceType_Cryo_FS = approvedStructureElement.getUuid(); } @@ -158,15 +152,15 @@ class NamesMultipleIT { String value = null; nameElementCommands = new NameElementCommand[] { - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "011", "checkCreate 1.3.011", "checkCreate 1.3.011"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "012", "checkCreate 1.3.012", "checkCreate 1.3.012"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "013", "checkCreate 1.3.013", "checkCreate 1.3.013"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "011", "checkCreate 2.3.011", "checkCreate 2.3.011"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "012", "checkCreate 2.3.012", "checkCreate 2.3.012"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "013", "checkCreate 2.3.013", "checkCreate 2.3.013"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "011", "checkCreate 3.3.011", "checkCreate 3.3.011"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "012", "checkCreate 3.3.012", "checkCreate 3.3.012"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "013", "checkCreate 3.3.013", "checkCreate 3.3.013") + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "011", "checkCreate 1.3.011"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "012", "checkCreate 1.3.012"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "013", "checkCreate 1.3.013"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "011", "checkCreate 2.3.011"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "012", "checkCreate 2.3.012"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "013", "checkCreate 2.3.013"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "011", "checkCreate 3.3.011"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "012", "checkCreate 3.3.012"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "013", "checkCreate 3.3.013") }; nameElementCommandsCreate = NameElementUtil.convertCommand2CommandCreate(nameElementCommands); nameElementCommandsUpdate = NameElementUtil.convertCommand2CommandUpdate(nameElementCommands); @@ -202,12 +196,6 @@ class NamesMultipleIT { ITUtilNames.assertValidate(nameElementCommandsCreate, NameCommand.CREATE, Boolean.FALSE); nameElementCommandsCreate[3].setDescription(value); ITUtilNames.assertValidate(nameElementCommandsCreate, NameCommand.CREATE, Boolean.TRUE); - - value = nameElementCommandsCreate[3].getComment(); - nameElementCommandsCreate[3].setComment(null); - ITUtilNames.assertValidate(nameElementCommandsCreate, NameCommand.CREATE, Boolean.FALSE); - nameElementCommandsCreate[3].setComment(value); - ITUtilNames.assertValidate(nameElementCommandsCreate, NameCommand.CREATE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -237,16 +225,16 @@ class NamesMultipleIT { int nbrNames = -1; nameElementCommands = new NameElementCommand[] { - new NameElementCommand(null, systemGroupAcc, null, null, "create 1.0.0", "create 1.0.0"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "021", "create 1.3.021", "create 1.3.021"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "022", "create 1.3.022", "create 1.3.022"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "023", "create 1.3.023", "create 1.3.023"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "021", "create 2.3.021", "create 2.3.021"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "022", "create 2.3.022", "create 2.3.022"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "023", "create 2.3.023", "create 2.3.023"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "021", "create 3.3.021", "create 3.3.021"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "022", "create 3.3.022", "create 3.3.022"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "023", "create 3.3.023", "create 3.3.023") + new NameElementCommand(null, systemGroupAcc, null, null, "create 1.0.0"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "021", "create 1.3.021"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "022", "create 1.3.022"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "023", "create 1.3.023"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "021", "create 2.3.021"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "022", "create 2.3.022"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "023", "create 2.3.023"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "021", "create 3.3.021"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "022", "create 3.3.022"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "023", "create 3.3.023") }; nameElementCommandsCreate = NameElementUtil.convertCommand2CommandCreate(nameElementCommands); nameElementCommandsUpdate = NameElementUtil.convertCommand2CommandUpdate(nameElementCommands); @@ -325,15 +313,15 @@ class NamesMultipleIT { String value = null; nameElementCommands = new NameElementCommand[] { - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "031", "checkUpdate 1.3.031", "checkUpdate 1.3.031"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "032", "checkUpdate 1.3.032", "checkUpdate 1.3.032"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "033", "checkUpdate 1.3.033", "checkUpdate 1.3.033"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "031", "checkUpdate 2.3.031", "checkUpdate 2.3.031"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "032", "checkUpdate 2.3.032", "checkUpdate 2.3.032"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "033", "checkUpdate 2.3.033", "checkUpdate 2.3.033"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "031", "checkUpdate 3.3.031", "checkUpdate 3.3.031"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "032", "checkUpdate 3.3.032", "checkUpdate 3.3.032"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "033", "checkUpdate 3.3.033", "checkUpdate 3.3.033") + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "031", "checkUpdate 1.3.031"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "032", "checkUpdate 1.3.032"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "033", "checkUpdate 1.3.033"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "031", "checkUpdate 2.3.031"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "032", "checkUpdate 2.3.032"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "033", "checkUpdate 2.3.033"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "031", "checkUpdate 3.3.031"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "032", "checkUpdate 3.3.032"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "033", "checkUpdate 3.3.033") }; nameElementCommandsCreate = NameElementUtil.convertCommand2CommandCreate(nameElementCommands); nameElementCommandsUpdate = NameElementUtil.convertCommand2CommandUpdate(nameElementCommands); @@ -393,12 +381,6 @@ class NamesMultipleIT { ITUtilNames.assertValidate(nameElementCommandsUpdate, NameCommand.UPDATE, Boolean.FALSE); nameElementCommandsUpdate[3].setDescription(value); ITUtilNames.assertValidate(nameElementCommandsUpdate, NameCommand.UPDATE, Boolean.TRUE); - - value = nameElementCommandsUpdate[3].getComment(); - nameElementCommandsUpdate[3].setComment(null); - ITUtilNames.assertValidate(nameElementCommandsUpdate, NameCommand.UPDATE, Boolean.FALSE); - nameElementCommandsUpdate[3].setComment(value); - ITUtilNames.assertValidate(nameElementCommandsUpdate, NameCommand.UPDATE, Boolean.TRUE); } @Test @@ -427,16 +409,16 @@ class NamesMultipleIT { int nbrNames = -1; nameElementCommands = new NameElementCommand[] { - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "041", "update 1.3.041", "update 1.3.041"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "042", "update 1.3.042", "update 1.3.042"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "043", "update 1.3.043", "update 1.3.043"), - new NameElementCommand(null, systemRFQ, null, null, "update 2.0.0", "update 2.0.0"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "041", "update 2.3.041", "update 2.3.041"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "042", "update 2.3.042", "update 2.3.042"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "043", "update 2.3.043", "update 2.3.043"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "041", "update 3.3.041", "update 3.3.041"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "042", "update 3.3.042", "update 3.3.042"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "043", "update 3.3.043", "update 3.3.043") + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "041", "update 1.3.041"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "042", "update 1.3.042"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "043", "update 1.3.043"), + new NameElementCommand(null, systemRFQ, null, null, "update 2.0.0"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "041", "update 2.3.041"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "042", "update 2.3.042"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "043", "update 2.3.043"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "041", "update 3.3.041"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "042", "update 3.3.042"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "043", "update 3.3.043") }; nameElementCommandsCreate = NameElementUtil.convertCommand2CommandCreate(nameElementCommands); nameElementCommandsUpdate = NameElementUtil.convertCommand2CommandUpdate(nameElementCommands); @@ -535,7 +517,6 @@ class NamesMultipleIT { // create in order to delete // validate delete // uuid - // comment NameElementCommandCreate[] nameElementCommandsCreate = null; NameElementCommandUpdate[] nameElementCommandsUpdate = null; @@ -544,18 +525,17 @@ class NamesMultipleIT { NameElement[] createdNameElements = null; int nbrNames = -1; UUID uuid = null; - String value = null; nameElementCommands = new NameElementCommand[] { - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "051", "checkDelete 1.3.051", "checkDelete 1.3.051"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "052", "checkDelete 1.3.052", "checkDelete 1.3.052"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "053", "checkDelete 1.3.053", "checkDelete 1.3.053"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "051", "checkDelete 2.3.051", "checkDelete 2.3.051"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "052", "checkDelete 2.3.052", "checkDelete 2.3.052"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "053", "checkDelete 2.3.053", "checkDelete 2.3.053"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "051", "checkDelete 3.3.051", "checkDelete 3.3.051"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "052", "checkDelete 3.3.052", "checkDelete 3.3.052"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "053", "checkDelete 3.3.053", "checkDelete 3.3.053") + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "051", "checkDelete 1.3.051"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "052", "checkDelete 1.3.052"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "053", "checkDelete 1.3.053"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "051", "checkDelete 2.3.051"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "052", "checkDelete 2.3.052"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "053", "checkDelete 2.3.053"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "051", "checkDelete 3.3.051"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "052", "checkDelete 3.3.052"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "053", "checkDelete 3.3.053") }; nameElementCommandsCreate = NameElementUtil.convertCommand2CommandCreate(nameElementCommands); nameElementCommandsUpdate = NameElementUtil.convertCommand2CommandUpdate(nameElementCommands); @@ -592,12 +572,6 @@ class NamesMultipleIT { ITUtilNames.assertValidate(nameElementCommandsConfirm, NameCommand.DELETE, Boolean.FALSE); nameElementCommandsConfirm[3].setUuid(uuid); ITUtilNames.assertValidate(nameElementCommandsConfirm, NameCommand.DELETE, Boolean.TRUE); - - value = nameElementCommandsConfirm[3].getComment(); - nameElementCommandsConfirm[3].setComment(null); - ITUtilNames.assertValidate(nameElementCommandsConfirm, NameCommand.DELETE, Boolean.FALSE); - nameElementCommandsConfirm[3].setComment(value); - ITUtilNames.assertValidate(nameElementCommandsConfirm, NameCommand.DELETE, Boolean.TRUE); } @Test @@ -618,12 +592,12 @@ class NamesMultipleIT { // create in order to delete // // names for each of - // system group + description + comment - // system group + device type + index + description + comment - // system + description + comment - // system + device type + index + description + comment - // subsystem + description + comment - // subsystem + device type + index + description + comment + // system group + description + // system group + device type + index + description + // system + description + // system + device type + index + description + // subsystem + description + // subsystem + device type + index + description NameElementCommandCreate[] nameElementCommandsCreate = null; NameElementCommandUpdate[] nameElementCommandsUpdate = null; @@ -633,16 +607,16 @@ class NamesMultipleIT { int nbrNames = -1; nameElementCommands = new NameElementCommand[] { - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "061", "delete 1.3.061", "delete 1.3.061"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "062", "delete 1.3.062", "delete 1.3.062"), - new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "063", "delete 1.3.063", "delete 1.3.063"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "061", "delete 2.3.061", "delete 2.3.061"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "062", "delete 2.3.062", "delete 2.3.062"), - new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "063", "delete 2.3.063", "delete 2.3.063"), - new NameElementCommand(null, subsystem010PRL, null, null, "delete 3.0.0", "delete 3.0.0"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "061", "delete 3.3.061", "delete 3.3.061"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "062", "delete 3.3.062", "delete 3.3.062"), - new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "063", "delete 3.3.063", "delete 3.3.063") + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "061", "delete 1.3.061"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "062", "delete 1.3.062"), + new NameElementCommand(null, systemGroupAcc, deviceType_Cryo_FS, "063", "delete 1.3.063"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "061", "delete 2.3.061"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "062", "delete 2.3.062"), + new NameElementCommand(null, systemRFQ, deviceType_Cryo_FS, "063", "delete 2.3.063"), + new NameElementCommand(null, subsystem010PRL, null, null, "delete 3.0.0"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "061", "delete 3.3.061"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "062", "delete 3.3.062"), + new NameElementCommand(null, subsystem010PRL, deviceType_Cryo_FS, "063", "delete 3.3.063") }; nameElementCommandsCreate = NameElementUtil.convertCommand2CommandCreate(nameElementCommands); nameElementCommandsUpdate = NameElementUtil.convertCommand2CommandUpdate(nameElementCommands); diff --git a/src/test/java/org/openepics/names/docker/complex/StructuresLevel3IT.java b/src/test/java/org/openepics/names/docker/complex/StructuresLevel3IT.java index e46f713df11c0004d15cfc42528d2f8688e71bd4..99fa99b56e52559a6c6e234671c7851db877f0ed 100644 --- a/src/test/java/org/openepics/names/docker/complex/StructuresLevel3IT.java +++ b/src/test/java/org/openepics/names/docker/complex/StructuresLevel3IT.java @@ -134,15 +134,13 @@ class StructuresLevel3IT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Acc", null, - "Accelerator. The ESS Linear Accelerator", "approved by alfio"); + "Acc", null, "Accelerator. The ESS Linear Accelerator"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemGroupAcc = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupAcc, - "RFQ", null, - "Radio Frequency Quadrupole", "empty"); + "RFQ", null, "Radio Frequency Quadrupole"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemRFQ = approvedStructureElement.getUuid(); @@ -150,57 +148,49 @@ class StructuresLevel3IT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Cryo", null, - "Cryogenics", "empty"); + "Cryo", null, "Cryogenics"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineCryo = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "EMR", null, - "Electromagnetic Resonators", "empty"); + "EMR", null, "Electromagnetic Resonators"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineEMR = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "HVAC", null, - "Heating, Cooling and Air Conditioning", "empty"); + "HVAC", null, "Heating, Cooling and Air Conditioning"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineHVAC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Proc", null, - "General Process Control", "empty"); + "Proc", null, "General Process Control"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineProc = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "SC", null, - "Software Controllers", "empty"); + "SC", null, "Software Controllers"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineSC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Vac", null, - "Vacuum", "empty"); + "Vac", null, "Vacuum"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineVac = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "WtrC", null, - "Water Cooling", "empty"); + "WtrC", null, "Water Cooling"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineWtrC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "BMD", null, - "Beam Magnets and Deflectors", "empty"); + "BMD", null, "Beam Magnets and Deflectors"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineBMD = approvedStructureElement.getUuid(); @@ -208,57 +198,49 @@ class StructuresLevel3IT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineCryo, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupCryo = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineEMR, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupEMR = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineHVAC, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupHVAC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineProc, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupProc = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineSC, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupSC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineVac, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupVac = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineWtrC, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupWtrC = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineBMD, - null, null, - "empty", "empty"); + null, null, "empty"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupBMD = approvedStructureElement.getUuid(); } @@ -295,20 +277,17 @@ class StructuresLevel3IT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "010PRL", null, - "01 Phase Reference Line", "Approved by Daniel Piso"); + "010PRL", null, "01 Phase Reference Line"); createdStructureElement_010PRL = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "010", null, - "RFQ-010", "Approved by Daniel Piso"); + "010", null, "RFQ-010"); createdStructureElement_010 = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemRFQ, - "N1U1", null, - "Power switch board 01. Electrical power cabinets", "Approved by Daniel Piso"); + "N1U1", null, "Power switch board 01. Electrical power cabinets"); createdStructureElement_N1U1 = ITUtilStructures.assertCreate(structureElementCommandCreate); approvedStructureElement = ITUtilStructures.assertApprove(StructureElementUtil.convertElement2CommandConfirm(createdStructureElement_010PRL)); @@ -393,208 +372,176 @@ class StructuresLevel3IT { structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupCryo, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); createdStructureElement_Cryo_FS = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupCryo, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); createdStructureElement_Cryo_IOC = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupCryo, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); createdStructureElement_Cryo_RFA = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupCryo, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); createdStructureElement_Cryo_TT = ITUtilStructures.assertCreate(structureElementCommandCreate); // ---------------------------------------------------------------------------------------------------- structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); createdStructureElement_EMR_FS = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); createdStructureElement_EMR_IOC = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); createdStructureElement_EMR_RFA = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupEMR, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); createdStructureElement_EMR_TT = ITUtilStructures.assertCreate(structureElementCommandCreate); // ---------------------------------------------------------------------------------------------------- structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupHVAC, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); createdStructureElement_HVAC_FS = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupHVAC, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); createdStructureElement_HVAC_IOC = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupHVAC, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); createdStructureElement_HVAC_RFA = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupHVAC, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); createdStructureElement_HVAC_TT = ITUtilStructures.assertCreate(structureElementCommandCreate); // ---------------------------------------------------------------------------------------------------- structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupProc, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); createdStructureElement_Proc_FS = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupProc, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); createdStructureElement_Proc_IOC = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupProc, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); createdStructureElement_Proc_RFA = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupProc, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); createdStructureElement_Proc_TT = ITUtilStructures.assertCreate(structureElementCommandCreate); // ---------------------------------------------------------------------------------------------------- structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupSC, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); createdStructureElement_SC_FS = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupSC, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); createdStructureElement_SC_IOC = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupSC, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); createdStructureElement_SC_RFA = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupSC, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); createdStructureElement_SC_TT = ITUtilStructures.assertCreate(structureElementCommandCreate); // ---------------------------------------------------------------------------------------------------- structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupVac, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); createdStructureElement_Vac_FS = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupVac, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); createdStructureElement_Vac_IOC = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupVac, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); createdStructureElement_Vac_RFA = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupVac, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); createdStructureElement_Vac_TT = ITUtilStructures.assertCreate(structureElementCommandCreate); // ---------------------------------------------------------------------------------------------------- structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupWtrC, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); createdStructureElement_WtrC_FS = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupWtrC, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); createdStructureElement_WtrC_IOC = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupWtrC, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); createdStructureElement_WtrC_RFA = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupWtrC, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); createdStructureElement_WtrC_TT = ITUtilStructures.assertCreate(structureElementCommandCreate); // ---------------------------------------------------------------------------------------------------- structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupBMD, - "FS", null, - "Flow Switch", "empty"); + "FS", null, "Flow Switch"); createdStructureElement_BMD_FS = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupBMD, - "IOC", null, - "Input Output Controller", "empty"); + "IOC", null, "Input Output Controller"); createdStructureElement_BMD_IOC = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupBMD, - "RFA", null, - "RF Antenna", "empty"); + "RFA", null, "RF Antenna"); createdStructureElement_BMD_RFA = ITUtilStructures.assertCreate(structureElementCommandCreate); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupBMD, - "TT", null, - "Temperature Transmitter", "empty"); + "TT", null, "Temperature Transmitter"); createdStructureElement_BMD_TT = ITUtilStructures.assertCreate(structureElementCommandCreate); // ---------------------------------------------------------------------------------------------------- diff --git a/src/test/java/org/openepics/names/docker/complex/StructuresMultipleIT.java b/src/test/java/org/openepics/names/docker/complex/StructuresMultipleIT.java index 278063edc576b929e35e43761a12a2c5cdc371ad..ecfcf0deb9d8033fbbc36235dd9dd24656ea4821 100644 --- a/src/test/java/org/openepics/names/docker/complex/StructuresMultipleIT.java +++ b/src/test/java/org/openepics/names/docker/complex/StructuresMultipleIT.java @@ -76,43 +76,37 @@ class StructuresMultipleIT { structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEMGROUP, null, - "Sg", null, - "description", "comment"); + "Sg", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemGroupUuid = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SYSTEM, systemGroupUuid, - "Sys", null, - "description", "comment"); + "Sys", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); systemUuid = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.SUBSYSTEM, systemUuid, - "Sub", null, - "description", "comment"); + "Sub", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); subsystemUuid = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DISCIPLINE, null, - "Di", null, - "description", "comment"); + "Di", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); disciplineUuid = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICEGROUP, disciplineUuid, - null, null, - "description", "comment"); + null, null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceGroupUuid = approvedStructureElement.getUuid(); structureElementCommandCreate = new StructureElementCommandCreate( Type.DEVICETYPE, deviceGroupUuid, - "Dt", null, - "description", "comment"); + "Dt", null, "description"); approvedStructureElement = ITUtilStructures.assertCreateApprove(structureElementCommandCreate); deviceTypeUuid = approvedStructureElement.getUuid(); } @@ -142,7 +136,6 @@ class StructuresMultipleIT { // name // mnemonic // description - // comment try { StructureElementCommandCreate[] structureElementCommandsCreate = null; @@ -182,12 +175,12 @@ class StructuresMultipleIT { ITUtilStructures.assertIsValidToCreate(Type.DEVICETYPE, "Di-DtChc", Boolean.TRUE); structureElementCommands = new StructureElementCommand[] { - new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgChc", null, "description", "comment"), - new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysChc", null, "description", "comment"), - new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubChc", null, "description", "comment"), - new StructureElementCommand(null, Type.DISCIPLINE, null, "DiChc", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtChc", null, "description", "comment") + new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgChc", null, "description"), + new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysChc", null, "description"), + new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubChc", null, "description"), + new StructureElementCommand(null, Type.DISCIPLINE, null, "DiChc", null, "description"), + new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description"), + new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtChc", null, "description") }; structureElementCommandsCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommands); structureElementCommandsUpdate = StructureElementUtil.convertCommand2CommandUpdate(structureElementCommands); @@ -223,12 +216,6 @@ class StructuresMultipleIT { ITUtilStructures.assertValidate(structureElementCommandsCreate, StructureCommand.CREATE, Boolean.FALSE); structureElementCommandsCreate[1].setDescription(value); ITUtilStructures.assertValidate(structureElementCommandsCreate, StructureCommand.CREATE, Boolean.TRUE); - - value = structureElementCommandsCreate[1].getComment(); - structureElementCommandsCreate[1].setComment(null); - ITUtilStructures.assertValidate(structureElementCommandsCreate, StructureCommand.CREATE, Boolean.FALSE); - structureElementCommandsCreate[1].setComment(value); - ITUtilStructures.assertValidate(structureElementCommandsCreate, StructureCommand.CREATE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -259,12 +246,12 @@ class StructuresMultipleIT { StructureElement[] approvedStructureElements = null; structureElementCommands = new StructureElementCommand[] { - new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgCa", null, "description", "comment"), - new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysCa", null, "description", "comment"), - new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubCa", null, "description", "comment"), - new StructureElementCommand(null, Type.DISCIPLINE, null, "DiCa", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtCa", null, "description", "comment") + new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgCa", null, "description"), + new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysCa", null, "description"), + new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubCa", null, "description"), + new StructureElementCommand(null, Type.DISCIPLINE, null, "DiCa", null, "description"), + new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description"), + new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtCa", null, "description") }; structureElementCommandsCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommands); structureElementCommandsUpdate = StructureElementUtil.convertCommand2CommandUpdate(structureElementCommands); @@ -370,12 +357,12 @@ class StructuresMultipleIT { StructureElement[] cancelledStructureElements = null; structureElementCommands = new StructureElementCommand[] { - new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgCc", null, "description", "comment"), - new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysCc", null, "description", "comment"), - new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubCc", null, "description", "comment"), - new StructureElementCommand(null, Type.DISCIPLINE, null, "DiCc", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtCc", null, "description", "comment") + new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgCc", null, "description"), + new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysCc", null, "description"), + new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubCc", null, "description"), + new StructureElementCommand(null, Type.DISCIPLINE, null, "DiCc", null, "description"), + new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description"), + new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtCc", null, "description") }; structureElementCommandsCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommands); structureElementCommandsUpdate = StructureElementUtil.convertCommand2CommandUpdate(structureElementCommands); @@ -479,12 +466,12 @@ class StructuresMultipleIT { StructureElement[] rejectedStructureElements = null; structureElementCommands = new StructureElementCommand[] { - new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgCr", null, "description", "comment"), - new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysCr", null, "description", "comment"), - new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubCr", null, "description", "comment"), - new StructureElementCommand(null, Type.DISCIPLINE, null, "DiCr", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtCr", null, "description", "comment") + new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgCr", null, "description"), + new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysCr", null, "description"), + new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubCr", null, "description"), + new StructureElementCommand(null, Type.DISCIPLINE, null, "DiCr", null, "description"), + new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description"), + new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtCr", null, "description") }; structureElementCommandsCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommands); structureElementCommandsUpdate = StructureElementUtil.convertCommand2CommandUpdate(structureElementCommands); @@ -590,7 +577,6 @@ class StructuresMultipleIT { // name // mnemonic // description - // comment try { StructureElementCommandCreate[] structureElementCommandsCreate = null; @@ -602,12 +588,12 @@ class StructuresMultipleIT { String value = null; structureElementCommands = new StructureElementCommand[] { - new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgCu", null, "description", "comment"), - new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysCu", null, "description", "comment"), - new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubCu", null, "description", "comment"), - new StructureElementCommand(null, Type.DISCIPLINE, null, "DiCu", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtCu", null, "description", "comment") + new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgCu", null, "description"), + new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysCu", null, "description"), + new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubCu", null, "description"), + new StructureElementCommand(null, Type.DISCIPLINE, null, "DiCu", null, "description"), + new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description"), + new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtCu", null, "description") }; structureElementCommandsCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommands); structureElementCommandsUpdate = StructureElementUtil.convertCommand2CommandUpdate(structureElementCommands); @@ -689,12 +675,6 @@ class StructuresMultipleIT { ITUtilStructures.assertValidate(structureElementCommandsUpdate, StructureCommand.UPDATE, Boolean.FALSE); structureElementCommandsUpdate[1].setDescription(value); ITUtilStructures.assertValidate(structureElementCommandsUpdate, StructureCommand.UPDATE, Boolean.TRUE); - - value = structureElementCommandsUpdate[1].getComment(); - structureElementCommandsUpdate[1].setComment(null); - ITUtilStructures.assertValidate(structureElementCommandsUpdate, StructureCommand.UPDATE, Boolean.FALSE); - structureElementCommandsUpdate[1].setComment(value); - ITUtilStructures.assertValidate(structureElementCommandsUpdate, StructureCommand.UPDATE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -727,12 +707,12 @@ class StructuresMultipleIT { StructureElement[] updatedStructureElements = null; structureElementCommands = new StructureElementCommand[] { - new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgUa", null, "description", "comment"), - new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysUa", null, "description", "comment"), - new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubUa", null, "description", "comment"), - new StructureElementCommand(null, Type.DISCIPLINE, null, "DiUa", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtUa", null, "description", "comment") + new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgUa", null, "description"), + new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysUa", null, "description"), + new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubUa", null, "description"), + new StructureElementCommand(null, Type.DISCIPLINE, null, "DiUa", null, "description"), + new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description"), + new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtUa", null, "description") }; structureElementCommandsCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommands); structureElementCommandsUpdate = StructureElementUtil.convertCommand2CommandUpdate(structureElementCommands); @@ -894,12 +874,12 @@ class StructuresMultipleIT { StructureElement[] cancelledStructureElements = null; structureElementCommands = new StructureElementCommand[] { - new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgUc", null, "description", "comment"), - new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysUc", null, "description", "comment"), - new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubUc", null, "description", "comment"), - new StructureElementCommand(null, Type.DISCIPLINE, null, "DiUc", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtUc", null, "description", "comment") + new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgUc", null, "description"), + new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysUc", null, "description"), + new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubUc", null, "description"), + new StructureElementCommand(null, Type.DISCIPLINE, null, "DiUc", null, "description"), + new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description"), + new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtUc", null, "description") }; structureElementCommandsCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommands); structureElementCommandsUpdate = StructureElementUtil.convertCommand2CommandUpdate(structureElementCommands); @@ -1061,12 +1041,12 @@ class StructuresMultipleIT { StructureElement[] rejectedStructureElements = null; structureElementCommands = new StructureElementCommand[] { - new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgUr", null, "description", "comment"), - new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysUr", null, "description", "comment"), - new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubUr", null, "description", "comment"), - new StructureElementCommand(null, Type.DISCIPLINE, null, "DiUr", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtUr", null, "description", "comment") + new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgUr", null, "description"), + new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysUr", null, "description"), + new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubUr", null, "description"), + new StructureElementCommand(null, Type.DISCIPLINE, null, "DiUr", null, "description"), + new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description"), + new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtUr", null, "description") }; structureElementCommandsCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommands); structureElementCommandsUpdate = StructureElementUtil.convertCommand2CommandUpdate(structureElementCommands); @@ -1217,7 +1197,6 @@ class StructuresMultipleIT { // validate delete // uuid // type - // comment try { StructureElementCommandCreate[] structureElementCommandsCreate = null; @@ -1226,15 +1205,14 @@ class StructuresMultipleIT { StructureElementCommand[] structureElementCommands = null; StructureElement[] approvedStructureElements = null; UUID uuid = null; - String value = null; structureElementCommands = new StructureElementCommand[] { - new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgCd", null, "description", "comment"), - new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysCd", null, "description", "comment"), - new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubCd", null, "description", "comment"), - new StructureElementCommand(null, Type.DISCIPLINE, null, "DiCd", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtCd", null, "description", "comment") + new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgCd", null, "description"), + new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysCd", null, "description"), + new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubCd", null, "description"), + new StructureElementCommand(null, Type.DISCIPLINE, null, "DiCd", null, "description"), + new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description"), + new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtCd", null, "description") }; structureElementCommandsCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommands); structureElementCommandsUpdate = StructureElementUtil.convertCommand2CommandUpdate(structureElementCommands); @@ -1292,12 +1270,6 @@ class StructuresMultipleIT { ITUtilStructures.assertValidate(structureElementCommandsConfirm, StructureCommand.DELETE, Boolean.FALSE); structureElementCommandsConfirm[1].setUuid(uuid); ITUtilStructures.assertValidate(structureElementCommandsConfirm, StructureCommand.DELETE, Boolean.TRUE); - - value = structureElementCommandsConfirm[1].getComment(); - structureElementCommandsConfirm[1].setComment(null); - ITUtilStructures.assertValidate(structureElementCommandsConfirm, StructureCommand.DELETE, Boolean.FALSE); - structureElementCommandsConfirm[1].setComment(value); - ITUtilStructures.assertValidate(structureElementCommandsConfirm, StructureCommand.DELETE, Boolean.TRUE); } catch (Exception e) { fail(); } @@ -1329,12 +1301,12 @@ class StructuresMultipleIT { StructureElement[] approvedStructureElements = null; structureElementCommands = new StructureElementCommand[] { - new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgDa", null, "description", "comment"), - new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysDa", null, "description", "comment"), - new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubDa", null, "description", "comment"), - new StructureElementCommand(null, Type.DISCIPLINE, null, "DiDa", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtDa", null, "description", "comment") + new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgDa", null, "description"), + new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysDa", null, "description"), + new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubDa", null, "description"), + new StructureElementCommand(null, Type.DISCIPLINE, null, "DiDa", null, "description"), + new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description"), + new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtDa", null, "description") }; structureElementCommandsCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommands); structureElementCommandsUpdate = StructureElementUtil.convertCommand2CommandUpdate(structureElementCommands); @@ -1466,12 +1438,12 @@ class StructuresMultipleIT { StructureElement[] cancelledStructureElements = null; structureElementCommands = new StructureElementCommand[] { - new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgDc", null, "description", "comment"), - new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysDc", null, "description", "comment"), - new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubDc", null, "description", "comment"), - new StructureElementCommand(null, Type.DISCIPLINE, null, "DiDc", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtDc", null, "description", "comment") + new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgDc", null, "description"), + new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysDc", null, "description"), + new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubDc", null, "description"), + new StructureElementCommand(null, Type.DISCIPLINE, null, "DiDc", null, "description"), + new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description"), + new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtDc", null, "description") }; structureElementCommandsCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommands); structureElementCommandsUpdate = StructureElementUtil.convertCommand2CommandUpdate(structureElementCommands); @@ -1603,12 +1575,12 @@ class StructuresMultipleIT { StructureElement[] rejectedStructureElements = null; structureElementCommands = new StructureElementCommand[] { - new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgDr", null, "description", "comment"), - new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysDr", null, "description", "comment"), - new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubDr", null, "description", "comment"), - new StructureElementCommand(null, Type.DISCIPLINE, null, "DiDr", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description", "comment"), - new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtDr", null, "description", "comment") + new StructureElementCommand(null, Type.SYSTEMGROUP, null, "SgDr", null, "description"), + new StructureElementCommand(null, Type.SYSTEM, systemGroupUuid, "SysDr", null, "description"), + new StructureElementCommand(null, Type.SUBSYSTEM, systemUuid, "SubDr", null, "description"), + new StructureElementCommand(null, Type.DISCIPLINE, null, "DiDr", null, "description"), + new StructureElementCommand(null, Type.DEVICEGROUP, disciplineUuid, "", null, "description"), + new StructureElementCommand(null, Type.DEVICETYPE, deviceGroupUuid, "DtDr", null, "description") }; structureElementCommandsCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommands); structureElementCommandsUpdate = StructureElementUtil.convertCommand2CommandUpdate(structureElementCommands); diff --git a/src/test/java/org/openepics/names/repository/model/DeviceGroupTest.java b/src/test/java/org/openepics/names/repository/model/DeviceGroupTest.java index 160dbfc57e4be7a5a6fc9df9030e105594b3efd1..6e54d0aac81227455719777105c14de975bf1db9 100644 --- a/src/test/java/org/openepics/names/repository/model/DeviceGroupTest.java +++ b/src/test/java/org/openepics/names/repository/model/DeviceGroupTest.java @@ -46,13 +46,13 @@ class DeviceGroupTest { s1 = new DeviceGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", null, null, - "description", Status.APPROVED, true, false, + "AA1", null, null, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new DeviceGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", null, null, - "description", Status.APPROVED, true, false, + "AA1", null, null, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertEquals(s1, s2); @@ -75,13 +75,13 @@ class DeviceGroupTest { s1 = new DeviceGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", null, null, - "description", Status.APPROVED, true, false, + "AA1", null, null, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new DeviceGroup( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", null, null, - "description", Status.APPROVED, true, false, + "AA1", null, null, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotEquals(s1, s2); @@ -105,13 +105,13 @@ class DeviceGroupTest { s1 = new DeviceGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", null, null, - "description", Status.APPROVED, true, false, + "AA1", null, null, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new DeviceGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", null, null, - "description", Status.APPROVED, true, false, + "AA1", null, null, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -127,13 +127,13 @@ class DeviceGroupTest { s1 = new DeviceGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", null, null, - "description", Status.APPROVED, true, false, + "AA1", null, null, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new DeviceGroup( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", null, null, - "description", Status.APPROVED, true, false, + "AA1", null, null, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -149,8 +149,8 @@ class DeviceGroupTest { s1 = new DeviceGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", null, null, - "description", Status.APPROVED, true, false, + "AA1", null, null, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toString(); @@ -168,8 +168,8 @@ class DeviceGroupTest { s1 = new DeviceGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", null, null, - "description", Status.APPROVED, true, false, + "AA1", null, null, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toStringSimple(); diff --git a/src/test/java/org/openepics/names/repository/model/DeviceTypeTest.java b/src/test/java/org/openepics/names/repository/model/DeviceTypeTest.java index 5506179a9e913be4f4415a9c06cf471e328f748d..e6733428caa2854743803e565f2cb0653455fc29 100644 --- a/src/test/java/org/openepics/names/repository/model/DeviceTypeTest.java +++ b/src/test/java/org/openepics/names/repository/model/DeviceTypeTest.java @@ -46,13 +46,13 @@ class DeviceTypeTest { s1 = new DeviceType( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new DeviceType( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertEquals(s1, s2); @@ -75,13 +75,13 @@ class DeviceTypeTest { s1 = new DeviceType( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new DeviceType( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotEquals(s1, s2); @@ -105,13 +105,13 @@ class DeviceTypeTest { s1 = new DeviceType( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new DeviceType( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -127,13 +127,13 @@ class DeviceTypeTest { s1 = new DeviceType( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new DeviceType( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -149,8 +149,8 @@ class DeviceTypeTest { s1 = new DeviceType( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toString(); @@ -168,8 +168,8 @@ class DeviceTypeTest { s1 = new DeviceType( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toStringSimple(); diff --git a/src/test/java/org/openepics/names/repository/model/DisciplineTest.java b/src/test/java/org/openepics/names/repository/model/DisciplineTest.java index 82c504eed1915d7c61483acfd0ee921bae520fcb..4f74ed815a5a0d816a87457e705f8221ec395adc 100644 --- a/src/test/java/org/openepics/names/repository/model/DisciplineTest.java +++ b/src/test/java/org/openepics/names/repository/model/DisciplineTest.java @@ -46,13 +46,13 @@ class DisciplineTest { s1 = new Discipline( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new Discipline( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertEquals(s1, s2); @@ -75,13 +75,13 @@ class DisciplineTest { s1 = new Discipline( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new Discipline( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotEquals(s1, s2); @@ -105,13 +105,13 @@ class DisciplineTest { s1 = new Discipline( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new Discipline( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -127,13 +127,13 @@ class DisciplineTest { s1 = new Discipline( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new Discipline( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -149,8 +149,8 @@ class DisciplineTest { s1 = new Discipline( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toString(); @@ -168,8 +168,8 @@ class DisciplineTest { s1 = new Discipline( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toStringSimple(); diff --git a/src/test/java/org/openepics/names/repository/model/NameTest.java b/src/test/java/org/openepics/names/repository/model/NameTest.java index 6b312e64cb867752c435f208fb273a7aeef03262..43f34e2aac5e5e7c34bfedec87257ee766c1cd78 100644 --- a/src/test/java/org/openepics/names/repository/model/NameTest.java +++ b/src/test/java/org/openepics/names/repository/model/NameTest.java @@ -46,13 +46,13 @@ class NameTest { n1 = new Name( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, null, - null, "Acc", "ACC", - null, Status.APPROVED, true, false, + null, "Acc", "ACC", null, + Status.APPROVED, true, false, date, "test who", null); n2 = new Name( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, null, - null, "Acc", "ACC", - null, Status.APPROVED, true, false, + null, "Acc", "ACC", null, + Status.APPROVED, true, false, date, "test who", null); assertEquals(n1, n2); @@ -75,13 +75,13 @@ class NameTest { n1 = new Name( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, null, - null, "Acc", "ACC", - null, Status.APPROVED, true, false, + null, "Acc", "ACC", null, + Status.APPROVED, true, false, date, "test who", null); n2 = new Name( UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, null, - null, "Acc", "ACC", - null, Status.APPROVED, true, false, + null, "Acc", "ACC", null, + Status.APPROVED, true, false, date, "test who", null); assertNotEquals(n1, n2); @@ -105,13 +105,13 @@ class NameTest { n1 = new Name( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, null, - null, "Acc", "ACC", - null, Status.APPROVED, true, false, + null, "Acc", "ACC", null, + Status.APPROVED, true, false, date, "test who", null); n2 = new Name( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, null, - null, "Acc", "ACC", - null, Status.APPROVED, true, false, + null, "Acc", "ACC", null, + Status.APPROVED, true, false, date, "test who", null); assertNotNull(n1); @@ -127,13 +127,13 @@ class NameTest { n1 = new Name( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, null, - null, "Acc", "ACC", - null, Status.APPROVED, true, false, + null, "Acc", "ACC", null, + Status.APPROVED, true, false, date, "test who", null); n2 = new Name( UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, null, - null, "Acc", "ACC", - null, Status.APPROVED, true, false, + null, "Acc", "ACC", null, + Status.APPROVED, true, false, date, "test who", null); assertNotNull(n1); @@ -149,8 +149,8 @@ class NameTest { n1 = new Name( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, null, - null, "Acc", "ACC", - null, Status.APPROVED, true, false, + null, "Acc", "ACC", null, + Status.APPROVED, true, false, date, "test who", null); String str = n1.toString(); @@ -168,8 +168,8 @@ class NameTest { n1 = new Name( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, null, - null, "Acc", "ACC", - null, Status.APPROVED, true, false, + null, "Acc", "ACC", null, + Status.APPROVED, true, false, date, "test who", null); String str = n1.toStringSimple(); diff --git a/src/test/java/org/openepics/names/repository/model/StructureTest.java b/src/test/java/org/openepics/names/repository/model/StructureTest.java index 55cfe7bcdc2d26effacc7d8c3ee2db2c360c6792..68a321317df025350c5f2b022d4f0cbd8663dea6 100644 --- a/src/test/java/org/openepics/names/repository/model/StructureTest.java +++ b/src/test/java/org/openepics/names/repository/model/StructureTest.java @@ -46,13 +46,13 @@ class StructureTest { s1 = new Structure( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new Structure( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertEquals(s1, s2); @@ -75,13 +75,13 @@ class StructureTest { s1 = new Structure( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new Structure( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotEquals(s1, s2); @@ -105,13 +105,13 @@ class StructureTest { s1 = new Structure( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new Structure( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -127,13 +127,13 @@ class StructureTest { s1 = new Structure( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new Structure( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -149,8 +149,8 @@ class StructureTest { s1 = new Structure( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toString(); @@ -168,8 +168,8 @@ class StructureTest { s1 = new Structure( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toStringSimple(); diff --git a/src/test/java/org/openepics/names/repository/model/SubsystemTest.java b/src/test/java/org/openepics/names/repository/model/SubsystemTest.java index ae6ae8dd57c3a967c46b465912ab574f01f99b9c..1b0b32824cabda470090fa1443fa5687096cb73b 100644 --- a/src/test/java/org/openepics/names/repository/model/SubsystemTest.java +++ b/src/test/java/org/openepics/names/repository/model/SubsystemTest.java @@ -46,13 +46,13 @@ class SubsystemTest { s1 = new Subsystem( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new Subsystem( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertEquals(s1, s2); @@ -75,13 +75,13 @@ class SubsystemTest { s1 = new Subsystem( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new Subsystem( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotEquals(s1, s2); @@ -105,13 +105,13 @@ class SubsystemTest { s1 = new Subsystem( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new Subsystem( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -127,13 +127,13 @@ class SubsystemTest { s1 = new Subsystem( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new Subsystem( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -149,8 +149,8 @@ class SubsystemTest { s1 = new Subsystem( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toString(); @@ -168,8 +168,8 @@ class SubsystemTest { s1 = new Subsystem( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toStringSimple(); diff --git a/src/test/java/org/openepics/names/repository/model/SystemGroupTest.java b/src/test/java/org/openepics/names/repository/model/SystemGroupTest.java index b75b495bf4ee5f29b274a0f0236f7377a9556e88..5b321bcc8f8bb6bd29e2783b3d964fe774ec273a 100644 --- a/src/test/java/org/openepics/names/repository/model/SystemGroupTest.java +++ b/src/test/java/org/openepics/names/repository/model/SystemGroupTest.java @@ -46,13 +46,13 @@ class SystemGroupTest { s1 = new SystemGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new SystemGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertEquals(s1, s2); @@ -75,13 +75,13 @@ class SystemGroupTest { s1 = new SystemGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new SystemGroup( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotEquals(s1, s2); @@ -105,13 +105,13 @@ class SystemGroupTest { s1 = new SystemGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new SystemGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -127,13 +127,13 @@ class SystemGroupTest { s1 = new SystemGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new SystemGroup( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -149,8 +149,8 @@ class SystemGroupTest { s1 = new SystemGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toString(); @@ -168,8 +168,8 @@ class SystemGroupTest { s1 = new SystemGroup( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toStringSimple(); diff --git a/src/test/java/org/openepics/names/repository/model/SystemTest.java b/src/test/java/org/openepics/names/repository/model/SystemTest.java index ce6304f56e136c14a6851015e9d4a89ef2cf871b..d7145b9eaea424767d1e3b61fdcb775d0d770b5e 100644 --- a/src/test/java/org/openepics/names/repository/model/SystemTest.java +++ b/src/test/java/org/openepics/names/repository/model/SystemTest.java @@ -46,13 +46,13 @@ class SystemTest { s1 = new System( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new System( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertEquals(s1, s2); @@ -75,13 +75,13 @@ class SystemTest { s1 = new System( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new System( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotEquals(s1, s2); @@ -105,13 +105,13 @@ class SystemTest { s1 = new System( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new System( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -127,13 +127,13 @@ class SystemTest { s1 = new System( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); s2 = new System( UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); assertNotNull(s1); @@ -149,8 +149,8 @@ class SystemTest { s1 = new System( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toString(); @@ -168,8 +168,8 @@ class SystemTest { s1 = new System( UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), - "AA1", "AA1", 41, - "description", Status.APPROVED, true, false, + "AA1", "AA1", 41, "description", + Status.APPROVED, true, false, date, "test who", "comment"); String str = s1.toStringSimple(); diff --git a/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandConfirmTest.java b/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandConfirmTest.java index efeea9dcf6409ca45053f628ff9b79277b917d6a..79dec121fb952cede44bce791b03c706b2614db5 100644 --- a/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandConfirmTest.java +++ b/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandConfirmTest.java @@ -46,9 +46,9 @@ class NameElementCommandConfirmTest { NameElementCommandConfirm ne1 = null, ne2 = null; ne1 = new NameElementCommandConfirm( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a")); ne2 = new NameElementCommandConfirm( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a")); assertEquals(ne1, ne2); } @@ -57,7 +57,7 @@ class NameElementCommandConfirmTest { void equalsJson() { ObjectMapper mapper = new ObjectMapper(); NameElementCommandConfirm ne1 = null, ne2 = null; - String json = "{\"uuid\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"comment\": null}"; + String json = "{\"uuid\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\"}"; try { ne1 = mapper.readValue(json, NameElementCommandConfirm.class); @@ -86,9 +86,9 @@ class NameElementCommandConfirmTest { NameElementCommandConfirm ne1 = null, ne2 = null; ne1 = new NameElementCommandConfirm( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a")); ne2 = new NameElementCommandConfirm( - UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), null); + UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a")); assertNotEquals(ne1, ne2); } @@ -97,8 +97,8 @@ class NameElementCommandConfirmTest { void notEqualsJson() { ObjectMapper mapper = new ObjectMapper(); NameElementCommandConfirm ne1 = null, ne2 = null; - String json = "{\"uuid\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"comment\": null}"; - String json2 = "{\"uuid\": \"55bdc415-cf5a-4650-b6dd-478540830c2a\", \"comment\": null}"; + String json = "{\"uuid\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\"}"; + String json2 = "{\"uuid\": \"55bdc415-cf5a-4650-b6dd-478540830c2a\"}"; try { ne1 = mapper.readValue(json, NameElementCommandConfirm.class); @@ -128,9 +128,9 @@ class NameElementCommandConfirmTest { NameElementCommandConfirm ne1 = null, ne2 = null; ne1 = new NameElementCommandConfirm( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a")); ne2 = new NameElementCommandConfirm( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a")); assertNotNull(ne1); assertNotNull(ne2); @@ -143,9 +143,9 @@ class NameElementCommandConfirmTest { NameElementCommandConfirm ne1 = null, ne2 = null; ne1 = new NameElementCommandConfirm( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a")); ne2 = new NameElementCommandConfirm( - UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), null); + UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a")); assertNotNull(ne1); assertNotNull(ne2); @@ -158,13 +158,12 @@ class NameElementCommandConfirmTest { NameElementCommandConfirm ne1 = null; ne1 = new NameElementCommandConfirm( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a")); String str = ne1.toString(); assertNotNull(str); assertTrue(str.contains("uuid")); - assertTrue(str.contains("comment")); } } diff --git a/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandCreateTest.java b/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandCreateTest.java index ea31033994ee6f7bcf3c769a9467ec364653655d..600e52b5c8d19657d88a274e94eb21aa9c60b8e9 100644 --- a/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandCreateTest.java +++ b/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandCreateTest.java @@ -46,11 +46,11 @@ class NameElementCommandCreateTest { NameElementCommandCreate ne1 = null, ne2 = null; ne1 = new NameElementCommandCreate( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, + null, "System structure only"); ne2 = new NameElementCommandCreate( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, + null, "System structure only"); assertEquals(ne1, ne2); } @@ -59,7 +59,7 @@ class NameElementCommandCreateTest { void equalsJson() { ObjectMapper mapper = new ObjectMapper(); NameElementCommandCreate ne1 = null, ne2 = null; - String json = "{\"parentSystemStructure\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\", \"comment\": null}"; + String json = "{\"parentSystemStructure\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\"}"; try { ne1 = mapper.readValue(json, NameElementCommandCreate.class); @@ -88,11 +88,11 @@ class NameElementCommandCreateTest { NameElementCommandCreate ne1 = null, ne2 = null; ne1 = new NameElementCommandCreate( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, + null, "System structure only"); ne2 = new NameElementCommandCreate( - UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), null, null, - "System structure only", null); + UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), null, + null, "System structure only"); assertNotEquals(ne1, ne2); } @@ -101,8 +101,8 @@ class NameElementCommandCreateTest { void notEqualsJson() { ObjectMapper mapper = new ObjectMapper(); NameElementCommandCreate ne1 = null, ne2 = null; - String json = "{\"parentSystemStructure\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\", \"comment\": null}"; - String json2 = "{\"parentSystemStructure\": \"55bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\", \"comment\": null}"; + String json = "{\"parentSystemStructure\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\"}"; + String json2 = "{\"parentSystemStructure\": \"55bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\"}"; try { ne1 = mapper.readValue(json, NameElementCommandCreate.class); @@ -132,11 +132,11 @@ class NameElementCommandCreateTest { NameElementCommandCreate ne1 = null, ne2 = null; ne1 = new NameElementCommandCreate( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, + null, "System structure only"); ne2 = new NameElementCommandCreate( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, + null, "System structure only"); assertNotNull(ne1); assertNotNull(ne2); @@ -149,11 +149,11 @@ class NameElementCommandCreateTest { NameElementCommandCreate ne1 = null, ne2 = null; ne1 = new NameElementCommandCreate( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, + null, "System structure only"); ne2 = new NameElementCommandCreate( - UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), null, null, - "System structure only", null); + UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), null, + null, "System structure only"); assertNotNull(ne1); assertNotNull(ne2); @@ -166,14 +166,13 @@ class NameElementCommandCreateTest { NameElementCommandCreate ne1 = null; ne1 = new NameElementCommandCreate( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), null, + null, "System structure only"); String str = ne1.toString(); assertNotNull(str); assertTrue(str.contains("parentSystemStructure")); - assertTrue(str.contains("comment")); } } diff --git a/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandTest.java b/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandTest.java index a2c9f8461b1da76d8c8d970a83578773375cc180..649bb0fd2a18033dd5edb2b9a9699bfe6d5ec32c 100644 --- a/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandTest.java +++ b/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandTest.java @@ -46,11 +46,11 @@ class NameElementCommandTest { NameElementCommand ne1 = null, ne2 = null; ne1 = new NameElementCommand( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only"); ne2 = new NameElementCommand( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only"); assertEquals(ne1, ne2); } @@ -59,7 +59,7 @@ class NameElementCommandTest { void equalsJson() { ObjectMapper mapper = new ObjectMapper(); NameElementCommand ne1 = null, ne2 = null; - String json = "{\"uuid\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentSystemStructure\": \"eb7e55c2-012b-419d-881a-58a858894e92\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\", \"comment\": null}"; + String json = "{\"uuid\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentSystemStructure\": \"eb7e55c2-012b-419d-881a-58a858894e92\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\"}"; try { ne1 = mapper.readValue(json, NameElementCommand.class); @@ -88,11 +88,11 @@ class NameElementCommandTest { NameElementCommand ne1 = null, ne2 = null; ne1 = new NameElementCommand( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only"); ne2 = new NameElementCommand( - UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only"); assertNotEquals(ne1, ne2); } @@ -101,8 +101,8 @@ class NameElementCommandTest { void notEqualsJson() { ObjectMapper mapper = new ObjectMapper(); NameElementCommand ne1 = null, ne2 = null; - String json = "{\"uuid\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentSystemStructure\": \"eb7e55c2-012b-419d-881a-58a858894e92\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\", \"comment\": null}"; - String json2 = "{\"uuid\": \"55bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentSystemStructure\": \"eb7e55c2-012b-419d-881a-58a858894e92\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\", \"comment\": null}"; + String json = "{\"uuid\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentSystemStructure\": \"eb7e55c2-012b-419d-881a-58a858894e92\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\"}"; + String json2 = "{\"uuid\": \"55bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentSystemStructure\": \"eb7e55c2-012b-419d-881a-58a858894e92\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\"}"; try { ne1 = mapper.readValue(json, NameElementCommand.class); @@ -132,11 +132,11 @@ class NameElementCommandTest { NameElementCommand ne1 = null, ne2 = null; ne1 = new NameElementCommand( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only"); ne2 = new NameElementCommand( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only"); assertNotNull(ne1); assertNotNull(ne2); @@ -149,11 +149,11 @@ class NameElementCommandTest { NameElementCommand ne1 = null, ne2 = null; ne1 = new NameElementCommand( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only"); ne2 = new NameElementCommand( - UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only"); assertNotNull(ne1); assertNotNull(ne2); @@ -166,14 +166,13 @@ class NameElementCommandTest { NameElementCommand ne1 = null; ne1 = new NameElementCommand( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only"); String str = ne1.toString(); assertNotNull(str); assertTrue(str.contains("uuid")); - assertTrue(str.contains("comment")); } } diff --git a/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandUpdateTest.java b/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandUpdateTest.java index 8c58552754cc47917f5b8d54d46093b37541dd3e..998853213456827a56eb02ec7c82823765e862f8 100644 --- a/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandUpdateTest.java +++ b/src/test/java/org/openepics/names/rest/beans/element/NameElementCommandUpdateTest.java @@ -47,10 +47,10 @@ class NameElementCommandUpdateTest { ne1 = new NameElementCommandUpdate( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + "System structure only"); ne2 = new NameElementCommandUpdate( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + "System structure only"); assertEquals(ne1, ne2); } @@ -59,7 +59,7 @@ class NameElementCommandUpdateTest { void equalsJson() { ObjectMapper mapper = new ObjectMapper(); NameElementCommandUpdate ne1 = null, ne2 = null; - String json = "{\"uuid\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentSystemStructure\": \"eb7e55c2-012b-419d-881a-58a858894e92\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\", \"comment\": null}"; + String json = "{\"uuid\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentSystemStructure\": \"eb7e55c2-012b-419d-881a-58a858894e92\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\"}"; try { ne1 = mapper.readValue(json, NameElementCommandUpdate.class); @@ -89,10 +89,10 @@ class NameElementCommandUpdateTest { ne1 = new NameElementCommandUpdate( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + "System structure only"); ne2 = new NameElementCommandUpdate( UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + "System structure only"); assertNotEquals(ne1, ne2); } @@ -101,8 +101,8 @@ class NameElementCommandUpdateTest { void notEqualsJson() { ObjectMapper mapper = new ObjectMapper(); NameElementCommandUpdate ne1 = null, ne2 = null; - String json = "{\"uuid\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentSystemStructure\": \"eb7e55c2-012b-419d-881a-58a858894e92\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\", \"comment\": null}"; - String json2 = "{\"uuid\": \"55bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentSystemStructure\": \"eb7e55c2-012b-419d-881a-58a858894e92\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\", \"comment\": null}"; + String json = "{\"uuid\": \"45bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentSystemStructure\": \"eb7e55c2-012b-419d-881a-58a858894e92\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\"}"; + String json2 = "{\"uuid\": \"55bdc415-cf5a-4650-b6dd-478540830c2a\", \"parentSystemStructure\": \"eb7e55c2-012b-419d-881a-58a858894e92\", \"parentDeviceStructure\": null, \"index\": null, \"description\": \"System structure only\"}"; try { ne1 = mapper.readValue(json, NameElementCommandUpdate.class); @@ -133,10 +133,10 @@ class NameElementCommandUpdateTest { ne1 = new NameElementCommandUpdate( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + "System structure only"); ne2 = new NameElementCommandUpdate( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + "System structure only"); assertNotNull(ne1); assertNotNull(ne2); @@ -150,10 +150,10 @@ class NameElementCommandUpdateTest { ne1 = new NameElementCommandUpdate( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + "System structure only"); ne2 = new NameElementCommandUpdate( UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + "System structure only"); assertNotNull(ne1); assertNotNull(ne2); @@ -167,13 +167,12 @@ class NameElementCommandUpdateTest { ne1 = new NameElementCommandUpdate( UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null); + "System structure only"); String str = ne1.toString(); assertNotNull(str); assertTrue(str.contains("uuid")); - assertTrue(str.contains("comment")); } } diff --git a/src/test/java/org/openepics/names/rest/beans/element/NameElementTest.java b/src/test/java/org/openepics/names/rest/beans/element/NameElementTest.java index 18d1e395a11426f7f3968e317f260d8585b814ac..d5a4b22016696ffbbd4f6b3d48386a0156516af3 100644 --- a/src/test/java/org/openepics/names/rest/beans/element/NameElementTest.java +++ b/src/test/java/org/openepics/names/rest/beans/element/NameElementTest.java @@ -50,17 +50,17 @@ class NameElementTest { Date date = new Date(); ne1 = new NameElement( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null, + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only", "Acc", null, "Acc", Status.APPROVED, true, false, - date, "test who"); + date, "test who", null); ne2 = new NameElement( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null, + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only", "Acc", null, "Acc", Status.APPROVED, true, false, - date, "test who"); + date, "test who", null); assertEquals(ne1, ne2); } @@ -99,17 +99,17 @@ class NameElementTest { Date date = new Date(); ne1 = new NameElement( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null, + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only", "Acc", null, "Acc", Status.APPROVED, true, false, - date, "test who"); + date, "test who", null); ne2 = new NameElement( - UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null, + UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only", "Acc", null, "Acc", Status.APPROVED, true, false, - date, "test who"); + date, "test who", null); assertNotEquals(ne1, ne2); } @@ -150,17 +150,17 @@ class NameElementTest { Date date = new Date(); ne1 = new NameElement( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null, + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only", "Acc", null, "Acc", Status.APPROVED, true, false, - date, "test who"); + date, "test who", null); ne2 = new NameElement( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null, + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only", "Acc", null, "Acc", Status.APPROVED, true, false, - date, "test who"); + date, "test who", null); assertNotNull(ne1); assertNotNull(ne2); @@ -174,17 +174,17 @@ class NameElementTest { Date date = new Date(); ne1 = new NameElement( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null, + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only", "Acc", null, "Acc", Status.APPROVED, true, false, - date, "test who"); + date, "test who", null); ne2 = new NameElement( - UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null, + UUID.fromString("55bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only", "Acc", null, "Acc", Status.APPROVED, true, false, - date, "test who"); + date, "test who", null); assertNotNull(ne1); assertNotNull(ne2); @@ -198,11 +198,11 @@ class NameElementTest { Date date = new Date(); ne1 = new NameElement( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null, + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only", "Acc", null, "Acc", Status.APPROVED, true, false, - date, "test who"); + date, "test who", null); String str = ne1.toString(); @@ -218,11 +218,11 @@ class NameElementTest { Date date = new Date(); ne1 = new NameElement( - UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, null, - "System structure only", null, + UUID.fromString("45bdc415-cf5a-4650-b6dd-478540830c2a"), UUID.fromString("eb7e55c2-012b-419d-881a-58a858894e92"), null, + null, "System structure only", "Acc", null, "Acc", Status.APPROVED, true, false, - date, "test who"); + date, "test who", null); String str = ne1.toStringSimple(); diff --git a/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandConfirmTest.java b/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandConfirmTest.java index f5470fa2a906e964d955cc9c6c3e9390c4593359..08e6ea68d798547c1f821cbc590d48edef704195 100644 --- a/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandConfirmTest.java +++ b/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandConfirmTest.java @@ -47,9 +47,9 @@ class StructureElementCommandConfirmTest { StructureElementCommandConfirm se1 = null, se2 = null; se1 = new StructureElementCommandConfirm( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM); se2 = new StructureElementCommandConfirm( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM); assertEquals(se1, se2); } @@ -58,7 +58,7 @@ class StructureElementCommandConfirmTest { void equalsJson() { ObjectMapper mapper = new ObjectMapper(); StructureElementCommandConfirm se1 = null, se2 = null; - String json = "{\"uuid\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"comment\": \"comment\"};"; + String json = "{\"uuid\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\"};"; try { se1 = mapper.readValue(json, StructureElementCommandConfirm.class); @@ -87,9 +87,9 @@ class StructureElementCommandConfirmTest { StructureElementCommandConfirm se1 = null, se2 = null; se1 = new StructureElementCommandConfirm( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM); se2 = new StructureElementCommandConfirm( - UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, "comment"); + UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM); assertNotEquals(se1, se2); } @@ -98,8 +98,8 @@ class StructureElementCommandConfirmTest { void notEqualsJson() { ObjectMapper mapper = new ObjectMapper(); StructureElementCommandConfirm se1 = null, se2 = null; - String json = "{\"uuid\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"comment\": \"comment\"};"; - String json2 = "{\"uuid\": \"b14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"comment\": \"comment\"};"; + String json = "{\"uuid\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\"};"; + String json2 = "{\"uuid\": \"b14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\"};"; try { se1 = mapper.readValue(json, StructureElementCommandConfirm.class); @@ -129,9 +129,9 @@ class StructureElementCommandConfirmTest { StructureElementCommandConfirm se1 = null, se2 = null; se1 = new StructureElementCommandConfirm( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM); se2 = new StructureElementCommandConfirm( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM); assertNotNull(se1); assertNotNull(se2); @@ -144,9 +144,9 @@ class StructureElementCommandConfirmTest { StructureElementCommandConfirm se1 = null, se2 = null; se1 = new StructureElementCommandConfirm( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM); se2 = new StructureElementCommandConfirm( - UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, "comment"); + UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM); assertNotNull(se1); assertNotNull(se2); @@ -159,13 +159,12 @@ class StructureElementCommandConfirmTest { StructureElementCommandConfirm se1 = null; se1 = new StructureElementCommandConfirm( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM); String str = se1.toString(); assertNotNull(str); assertTrue(str.contains("uuid")); - assertTrue(str.contains("comment")); } } diff --git a/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandCreateTest.java b/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandCreateTest.java index da76f3c88b1537a7addc354caaa5752fccf0955e..fdb45ae72f66c3be6d51e12653216bdfe55a291f 100644 --- a/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandCreateTest.java +++ b/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandCreateTest.java @@ -47,9 +47,11 @@ class StructureElementCommandCreateTest { StructureElementCommandCreate se1 = null, se2 = null; se1 = new StructureElementCommandCreate( - Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), "AA1", 41, "description", "comment"); + Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), + "AA1", 41, "description"); se2 = new StructureElementCommandCreate( - Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), "AA1", 41, "description", "comment"); + Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), + "AA1", 41, "description"); assertEquals(se1, se2); } @@ -58,7 +60,7 @@ class StructureElementCommandCreateTest { void equalsJson() { ObjectMapper mapper = new ObjectMapper(); StructureElementCommandCreate se1 = null, se2 = null; - String json = "{\"type\": \"SYSTEM\", \"parent\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\", \"comment\": \"comment\"};"; + String json = "{\"type\": \"SYSTEM\", \"parent\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\"};"; try { se1 = mapper.readValue(json, StructureElementCommandCreate.class); @@ -87,9 +89,11 @@ class StructureElementCommandCreateTest { StructureElementCommandCreate se1 = null, se2 = null; se1 = new StructureElementCommandCreate( - Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), "AA1", 41, "description", "comment"); + Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), + "AA1", 41, "description"); se2 = new StructureElementCommandCreate( - Type.SYSTEM, UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), "AA1", 41, "description", "comment"); + Type.SYSTEM, UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), + "AA1", 41, "description"); assertNotEquals(se1, se2); } @@ -98,8 +102,8 @@ class StructureElementCommandCreateTest { void notEqualsJson() { ObjectMapper mapper = new ObjectMapper(); StructureElementCommandCreate se1 = null, se2 = null; - String json = "{\"type\": \"SYSTEM\", \"parent\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\", \"comment\": \"comment\"};"; - String json2 = "{\"type\": \"SYSTEM\", \"parent\": \"b14a8565-de10-4026-97e3-ab129ffaba96\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\", \"comment\": \"comment\"};"; + String json = "{\"type\": \"SYSTEM\", \"parent\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\"};"; + String json2 = "{\"type\": \"SYSTEM\", \"parent\": \"b14a8565-de10-4026-97e3-ab129ffaba96\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\"};"; try { se1 = mapper.readValue(json, StructureElementCommandCreate.class); @@ -129,9 +133,11 @@ class StructureElementCommandCreateTest { StructureElementCommandCreate se1 = null, se2 = null; se1 = new StructureElementCommandCreate( - Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), "AA1", 41, "description", "comment"); + Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), + "AA1", 41, "description"); se2 = new StructureElementCommandCreate( - Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), "AA1", 41, "description", "comment"); + Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), + "AA1", 41, "description"); assertNotNull(se1); assertNotNull(se2); @@ -144,9 +150,11 @@ class StructureElementCommandCreateTest { StructureElementCommandCreate se1 = null, se2 = null; se1 = new StructureElementCommandCreate( - Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), "AA1", 41, "description", "comment"); + Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), + "AA1", 41, "description"); se2 = new StructureElementCommandCreate( - Type.SYSTEM, UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), "AA1", 41, "description", "comment"); + Type.SYSTEM, UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), + "AA1", 41, "description"); assertNotNull(se1); assertNotNull(se2); @@ -159,13 +167,13 @@ class StructureElementCommandCreateTest { StructureElementCommandCreate se1 = null; se1 = new StructureElementCommandCreate( - Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), "AA1", 41, "description", "comment"); + Type.SYSTEM, UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), + "AA1", 41, "description"); String str = se1.toString(); assertNotNull(str); assertTrue(str.contains("parent")); - assertTrue(str.contains("comment")); } } diff --git a/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandTest.java b/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandTest.java index fd65f7db520136e13e22dd90037bc8d090ee8871..385f63730c24e6dd70874b0022142b095a0ac270 100644 --- a/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandTest.java +++ b/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandTest.java @@ -47,9 +47,11 @@ class StructureElementCommandTest { StructureElementCommand se1 = null, se2 = null; se1 = new StructureElementCommand( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); se2 = new StructureElementCommand( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); assertEquals(se1, se2); } @@ -58,7 +60,7 @@ class StructureElementCommandTest { void equalsJson() { ObjectMapper mapper = new ObjectMapper(); StructureElementCommand se1 = null, se2 = null; - String json = "{\"uuid\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"parent\": \"05d52f1c-391e-41e3-a48f-dc8f36f8329b\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\", \"comment\": \"comment\"};"; + String json = "{\"uuid\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"parent\": \"05d52f1c-391e-41e3-a48f-dc8f36f8329b\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\"};"; try { se1 = mapper.readValue(json, StructureElementCommand.class); @@ -87,9 +89,11 @@ class StructureElementCommandTest { StructureElementCommand se1 = null, se2 = null; se1 = new StructureElementCommand( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); se2 = new StructureElementCommand( - UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); assertNotEquals(se1, se2); } @@ -98,8 +102,8 @@ class StructureElementCommandTest { void notEqualsJson() { ObjectMapper mapper = new ObjectMapper(); StructureElementCommand se1 = null, se2 = null; - String json = "{\"uuid\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"parent\": \"05d52f1c-391e-41e3-a48f-dc8f36f8329b\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\", \"comment\": \"comment\"};"; - String json2 = "{\"uuid\": \"b14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"parent\": \"05d52f1c-391e-41e3-a48f-dc8f36f8329b\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\", \"comment\": \"comment\"};"; + String json = "{\"uuid\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"parent\": \"05d52f1c-391e-41e3-a48f-dc8f36f8329b\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\"};"; + String json2 = "{\"uuid\": \"b14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"parent\": \"05d52f1c-391e-41e3-a48f-dc8f36f8329b\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\"};"; try { se1 = mapper.readValue(json, StructureElementCommand.class); @@ -129,9 +133,11 @@ class StructureElementCommandTest { StructureElementCommand se1 = null, se2 = null; se1 = new StructureElementCommand( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); se2 = new StructureElementCommand( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); assertNotNull(se1); assertNotNull(se2); @@ -144,9 +150,11 @@ class StructureElementCommandTest { StructureElementCommand se1 = null, se2 = null; se1 = new StructureElementCommand( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); se2 = new StructureElementCommand( - UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); assertNotNull(se1); assertNotNull(se2); @@ -159,13 +167,13 @@ class StructureElementCommandTest { StructureElementCommand se1 = null; se1 = new StructureElementCommand( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); String str = se1.toString(); assertNotNull(str); assertTrue(str.contains("uuid")); - assertTrue(str.contains("comment")); } } diff --git a/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandUpdateTest.java b/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandUpdateTest.java index 77d4cd5e5a2427385bfdd8fa3f9945a345e792f6..7b093e824f61af523ec5902a81d75cd323d124f3 100644 --- a/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandUpdateTest.java +++ b/src/test/java/org/openepics/names/rest/beans/element/StructureElementCommandUpdateTest.java @@ -47,9 +47,11 @@ class StructureElementCommandUpdateTest { StructureElementCommandUpdate se1 = null, se2 = null; se1 = new StructureElementCommandUpdate( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); se2 = new StructureElementCommandUpdate( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); assertEquals(se1, se2); } @@ -58,7 +60,7 @@ class StructureElementCommandUpdateTest { void equalsJson() { ObjectMapper mapper = new ObjectMapper(); StructureElementCommandUpdate se1 = null, se2 = null; - String json = "{\"uuid\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"parent\": \"05d52f1c-391e-41e3-a48f-dc8f36f8329b\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\", \"comment\": \"comment\"};"; + String json = "{\"uuid\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"parent\": \"05d52f1c-391e-41e3-a48f-dc8f36f8329b\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\"};"; try { se1 = mapper.readValue(json, StructureElementCommandUpdate.class); @@ -87,9 +89,11 @@ class StructureElementCommandUpdateTest { StructureElementCommandUpdate se1 = null, se2 = null; se1 = new StructureElementCommandUpdate( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); se2 = new StructureElementCommandUpdate( - UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); assertNotEquals(se1, se2); } @@ -98,8 +102,8 @@ class StructureElementCommandUpdateTest { void notEqualsJson() { ObjectMapper mapper = new ObjectMapper(); StructureElementCommandUpdate se1 = null, se2 = null; - String json = "{\"uuid\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"parent\": \"05d52f1c-391e-41e3-a48f-dc8f36f8329b\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\", \"comment\": \"comment\"};"; - String json2 = "{\"uuid\": \"b14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"parent\": \"05d52f1c-391e-41e3-a48f-dc8f36f8329b\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\", \"comment\": \"comment\"};"; + String json = "{\"uuid\": \"a14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"parent\": \"05d52f1c-391e-41e3-a48f-dc8f36f8329b\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\"};"; + String json2 = "{\"uuid\": \"b14a8565-de10-4026-97e3-ab129ffaba96\", \"type\": \"SYSTEM\", \"parent\": \"05d52f1c-391e-41e3-a48f-dc8f36f8329b\", \"mnemonic\": \"AA1\", \"ordering\": \"41\", \"description\": \"description\"};"; try { se1 = mapper.readValue(json, StructureElementCommandUpdate.class); @@ -129,9 +133,11 @@ class StructureElementCommandUpdateTest { StructureElementCommandUpdate se1 = null, se2 = null; se1 = new StructureElementCommandUpdate( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); se2 = new StructureElementCommandUpdate( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); assertNotNull(se1); assertNotNull(se2); @@ -144,9 +150,11 @@ class StructureElementCommandUpdateTest { StructureElementCommandUpdate se1 = null, se2 = null; se1 = new StructureElementCommandUpdate( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); se2 = new StructureElementCommandUpdate( - UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); assertNotNull(se1); assertNotNull(se2); @@ -159,13 +167,13 @@ class StructureElementCommandUpdateTest { StructureElementCommandUpdate se1 = null; se1 = new StructureElementCommandUpdate( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, "description", "comment"); + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description"); String str = se1.toString(); assertNotNull(str); assertTrue(str.contains("uuid")); - assertTrue(str.contains("comment")); } } diff --git a/src/test/java/org/openepics/names/rest/beans/element/StructureElementTest.java b/src/test/java/org/openepics/names/rest/beans/element/StructureElementTest.java index 31883038f2fdaa7f9a5d5da5dd2d0db5c74ab5f5..9454bfbd0716a29906617a52620f03759cc595c1 100644 --- a/src/test/java/org/openepics/names/rest/beans/element/StructureElementTest.java +++ b/src/test/java/org/openepics/names/rest/beans/element/StructureElementTest.java @@ -51,17 +51,17 @@ class StructureElementTest { Date date = new Date(); se1 = new StructureElement( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, - "description", "comment", + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description", "AA1", 2, Status.APPROVED, true, false, - date, "test who"); + date, "test who", "comment"); se2 = new StructureElement( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, - "description", "comment", + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description", "AA1", 2, Status.APPROVED, true, false, - date, "test who"); + date, "test who", "comment"); assertEquals(se1, se2); } @@ -100,17 +100,17 @@ class StructureElementTest { Date date = new Date(); se1 = new StructureElement( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, - "description", "comment", + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description", "AA1", 2, Status.APPROVED, true, false, - date, "test who"); + date, "test who", "comment"); se2 = new StructureElement( - UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, - "description", "comment", + UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description", "AA1", 2, Status.APPROVED, true, false, - date, "test who"); + date, "test who", "comment"); assertNotEquals(se1, se2); } @@ -151,17 +151,17 @@ class StructureElementTest { Date date = new Date(); se1 = new StructureElement( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, - "description", "comment", + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description", "AA1", 2, Status.APPROVED, true, false, - date, "test who"); + date, "test who", "comment"); se2 = new StructureElement( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, - "description", "comment", + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description", "AA1", 2, Status.APPROVED, true, false, - date, "test who"); + date, "test who", "comment"); assertNotNull(se1); assertNotNull(se2); @@ -175,17 +175,17 @@ class StructureElementTest { Date date = new Date(); se1 = new StructureElement( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, - "description", "comment", + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description", "AA1", 2, Status.APPROVED, true, false, - date, "test who"); + date, "test who", "comment"); se2 = new StructureElement( - UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, - "description", "comment", + UUID.fromString("b14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description", "AA1", 2, Status.APPROVED, true, false, - date, "test who"); + date, "test who", "comment"); assertNotNull(se1); assertNotNull(se2); @@ -199,11 +199,11 @@ class StructureElementTest { Date date = new Date(); se1 = new StructureElement( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, - "description", "comment", + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description", "AA1", 2, Status.APPROVED, true, false, - date, "test who"); + date, "test who", "comment"); String str = se1.toString(); @@ -219,11 +219,11 @@ class StructureElementTest { Date date = new Date(); se1 = new StructureElement( - UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), "AA1", 41, - "description", "comment", + UUID.fromString("a14a8565-de10-4026-97e3-ab129ffaba96"), Type.SYSTEM, UUID.fromString("05d52f1c-391e-41e3-a48f-dc8f36f8329b"), + "AA1", 41, "description", "AA1", 2, Status.APPROVED, true, false, - date, "test who"); + date, "test who", "comment"); String str = se1.toStringSimple(); diff --git a/src/test/java/org/openepics/names/util/NameElementUtilTest.java b/src/test/java/org/openepics/names/util/NameElementUtilTest.java index 1c22959b4b92b5637c258b4dc941fc5db5e2546d..38ce1a5c1860e286db04a8085b7cdc7319fc201a 100644 --- a/src/test/java/org/openepics/names/util/NameElementUtilTest.java +++ b/src/test/java/org/openepics/names/util/NameElementUtilTest.java @@ -79,11 +79,11 @@ class NameElementUtilTest { UUID uuid = UUID.randomUUID(); UUID parentSystemStructure = UUID.randomUUID(); UUID parentDeviceStructure = UUID.randomUUID(); + String index = "ty"; + String description = "op"; String systemStructure = "qw"; String deviceStructure = "er"; - String index = "ty"; String name = "ui"; - String description = "op"; Status status = Status.APPROVED; Boolean latest = Boolean.TRUE; Boolean deleted = Boolean.FALSE; @@ -92,11 +92,10 @@ class NameElementUtilTest { String comment = "df"; NameElement nameElement = NameElementUtil.getNameElement( - uuid, - parentSystemStructure, parentDeviceStructure, - systemStructure, deviceStructure, - index, name, - description, status, latest, deleted, + uuid, parentSystemStructure, parentDeviceStructure, + index, description, + systemStructure, deviceStructure, name, + status, latest, deleted, when, who, comment); assertNotNull(nameElement); @@ -127,9 +126,8 @@ class NameElementUtilTest { UUID uuid3 = UUID.randomUUID(); String str1 = "qwer"; String str2 = "asdf"; - String str3 = "zxcv"; - NameElementCommandCreate commandCreate = new NameElementCommandCreate(uuid2, uuid3, str1, str2, str3); + NameElementCommandCreate commandCreate = new NameElementCommandCreate(uuid2, uuid3, str1, str2); NameElementCommand command = NameElementUtil.convertCommandCreate2Command(commandCreate); assertNotNull(command); @@ -138,7 +136,6 @@ class NameElementUtilTest { assertEquals(uuid3, command.getParentDeviceStructure()); assertEquals(str1, command.getIndex()); assertEquals(str2, command.getDescription()); - assertEquals(str3, command.getComment()); } /** @@ -151,9 +148,8 @@ class NameElementUtilTest { UUID uuid3 = UUID.randomUUID(); String str1 = "qwer"; String str2 = "asdf"; - String str3 = "zxcv"; - NameElementCommandUpdate commandUpdate = new NameElementCommandUpdate(uuid1, uuid2, uuid3, str1, str2, str3); + NameElementCommandUpdate commandUpdate = new NameElementCommandUpdate(uuid1, uuid2, uuid3, str1, str2); NameElementCommand command = NameElementUtil.convertCommandUpdate2Command(commandUpdate); assertNotNull(command); @@ -162,7 +158,6 @@ class NameElementUtilTest { assertEquals(uuid3, command.getParentDeviceStructure()); assertEquals(str1, command.getIndex()); assertEquals(str2, command.getDescription()); - assertEquals(str3, command.getComment()); } /** @@ -171,9 +166,8 @@ class NameElementUtilTest { @Test void convertCommandConfirm2Command() { UUID uuid1 = UUID.randomUUID(); - String str3 = "zxcv"; - NameElementCommandConfirm commandConfirm = new NameElementCommandConfirm(uuid1, str3); + NameElementCommandConfirm commandConfirm = new NameElementCommandConfirm(uuid1); NameElementCommand command = NameElementUtil.convertCommandConfirm2Command(commandConfirm); assertNotNull(command); @@ -182,7 +176,6 @@ class NameElementUtilTest { assertNull(command.getParentDeviceStructure()); assertNull(command.getIndex()); assertNull(command.getDescription()); - assertEquals(str3, command.getComment()); } // ---------------------------------------------------------------------------------------------------- @@ -197,9 +190,8 @@ class NameElementUtilTest { UUID uuid3 = UUID.randomUUID(); String str1 = "qwer"; String str2 = "asdf"; - String str3 = "zxcv"; - NameElementCommand command = new NameElementCommand(uuid1, uuid2, uuid3, str1, str2, str3); + NameElementCommand command = new NameElementCommand(uuid1, uuid2, uuid3, str1, str2); NameElementCommandCreate commandCreate = NameElementUtil.convertCommand2CommandCreate(command); assertNotNull(commandCreate); @@ -207,7 +199,6 @@ class NameElementUtilTest { assertEquals(uuid3, commandCreate.getParentDeviceStructure()); assertEquals(str1, commandCreate.getIndex()); assertEquals(str2, commandCreate.getDescription()); - assertEquals(str3, commandCreate.getComment()); NameElementCommandCreate[] commandCreate2 = NameElementUtil.convertCommand2CommandCreate(new NameElementCommand[] {command}); @@ -218,7 +209,6 @@ class NameElementUtilTest { assertEquals(uuid3, commandCreate2[0].getParentDeviceStructure()); assertEquals(str1, commandCreate2[0].getIndex()); assertEquals(str2, commandCreate2[0].getDescription()); - assertEquals(str3, commandCreate2[0].getComment()); } /** @@ -231,9 +221,8 @@ class NameElementUtilTest { UUID uuid3 = UUID.randomUUID(); String str1 = "qwer"; String str2 = "asdf"; - String str3 = "zxcv"; - NameElementCommand command = new NameElementCommand(uuid1, uuid2, uuid3, str1, str2, str3); + NameElementCommand command = new NameElementCommand(uuid1, uuid2, uuid3, str1, str2); NameElementCommandUpdate commandUpdate = NameElementUtil.convertCommand2CommandUpdate(command); assertNotNull(commandUpdate); @@ -242,7 +231,6 @@ class NameElementUtilTest { assertEquals(uuid3, commandUpdate.getParentDeviceStructure()); assertEquals(str1, commandUpdate.getIndex()); assertEquals(str2, commandUpdate.getDescription()); - assertEquals(str3, commandUpdate.getComment()); NameElementCommandUpdate[] commandUpdate2 = NameElementUtil.convertCommand2CommandUpdate(new NameElementCommand[] {command}); @@ -254,7 +242,6 @@ class NameElementUtilTest { assertEquals(uuid3, commandUpdate2[0].getParentDeviceStructure()); assertEquals(str1, commandUpdate2[0].getIndex()); assertEquals(str2, commandUpdate2[0].getDescription()); - assertEquals(str3, commandUpdate2[0].getComment()); } /** @@ -267,14 +254,12 @@ class NameElementUtilTest { UUID uuid3 = UUID.randomUUID(); String str1 = "qwer"; String str2 = "asdf"; - String str3 = "zxcv"; - NameElementCommand command = new NameElementCommand(uuid1, uuid2, uuid3, str1, str2, str3); + NameElementCommand command = new NameElementCommand(uuid1, uuid2, uuid3, str1, str2); NameElementCommandConfirm commandConfirm = NameElementUtil.convertCommand2CommandConfirm(command); assertNotNull(commandConfirm); assertEquals(uuid1, commandConfirm.getUuid()); - assertEquals(str3, commandConfirm.getComment()); NameElementCommandConfirm[] commandConfirm2 = NameElementUtil.convertCommand2CommandConfirm(new NameElementCommand[] {command}); @@ -282,7 +267,6 @@ class NameElementUtilTest { assertEquals(1, commandConfirm2.length); assertNotNull(commandConfirm2[0]); assertEquals(uuid1, commandConfirm2[0].getUuid()); - assertEquals(str3, commandConfirm2[0].getComment()); } // ---------------------------------------------------------------------------------------------------- @@ -295,11 +279,11 @@ class NameElementUtilTest { UUID uuid = UUID.randomUUID(); UUID parentSystemStructure = UUID.randomUUID(); UUID parentDeviceStructure = UUID.randomUUID(); + String index = "ty"; + String description = "op"; String systemStructure = "qw"; String deviceStructure = "er"; - String index = "ty"; String name = "ui"; - String description = "op"; Status status = Status.APPROVED; Boolean latest = Boolean.TRUE; Boolean deleted = Boolean.FALSE; @@ -308,11 +292,10 @@ class NameElementUtilTest { String comment = "df"; NameElement element = NameElementUtil.getNameElement( - uuid, - parentSystemStructure, parentDeviceStructure, - systemStructure, deviceStructure, - index, name, - description, status, latest, deleted, + uuid, parentSystemStructure, parentDeviceStructure, + index, description, + systemStructure, deviceStructure, name, + status, latest, deleted, when, who, comment); NameElementCommandCreate commandCreate = NameElementUtil.convertElement2CommandCreate(element); @@ -322,7 +305,6 @@ class NameElementUtilTest { assertEquals(parentDeviceStructure, commandCreate.getParentDeviceStructure()); assertEquals(index, commandCreate.getIndex()); assertEquals(description, commandCreate.getDescription()); - assertEquals(comment, commandCreate.getComment()); NameElementCommandCreate[] commandCreate2 = NameElementUtil.convertElement2CommandCreate(new NameElement[] {element}); @@ -333,7 +315,6 @@ class NameElementUtilTest { assertEquals(parentDeviceStructure, commandCreate2[0].getParentDeviceStructure()); assertEquals(index, commandCreate2[0].getIndex()); assertEquals(description, commandCreate2[0].getDescription()); - assertEquals(comment, commandCreate2[0].getComment()); } /** @@ -344,11 +325,11 @@ class NameElementUtilTest { UUID uuid = UUID.randomUUID(); UUID parentSystemStructure = UUID.randomUUID(); UUID parentDeviceStructure = UUID.randomUUID(); + String index = "ty"; + String description = "op"; String systemStructure = "qw"; String deviceStructure = "er"; - String index = "ty"; String name = "ui"; - String description = "op"; Status status = Status.APPROVED; Boolean latest = Boolean.TRUE; Boolean deleted = Boolean.FALSE; @@ -357,11 +338,10 @@ class NameElementUtilTest { String comment = "df"; NameElement element = NameElementUtil.getNameElement( - uuid, - parentSystemStructure, parentDeviceStructure, - systemStructure, deviceStructure, - index, name, - description, status, latest, deleted, + uuid, parentSystemStructure, parentDeviceStructure, + index, description, + systemStructure, deviceStructure, name, + status, latest, deleted, when, who, comment); NameElementCommandUpdate commandUpdate = NameElementUtil.convertElement2CommandUpdate(element); @@ -372,7 +352,6 @@ class NameElementUtilTest { assertEquals(parentDeviceStructure, commandUpdate.getParentDeviceStructure()); assertEquals(index, commandUpdate.getIndex()); assertEquals(description, commandUpdate.getDescription()); - assertEquals(comment, commandUpdate.getComment()); NameElementCommandUpdate[] commandUpdate2 = NameElementUtil.convertElement2CommandUpdate(new NameElement[] {element}); @@ -384,7 +363,6 @@ class NameElementUtilTest { assertEquals(parentDeviceStructure, commandUpdate2[0].getParentDeviceStructure()); assertEquals(index, commandUpdate2[0].getIndex()); assertEquals(description, commandUpdate2[0].getDescription()); - assertEquals(comment, commandUpdate2[0].getComment()); } /** @@ -395,11 +373,11 @@ class NameElementUtilTest { UUID uuid = UUID.randomUUID(); UUID parentSystemStructure = UUID.randomUUID(); UUID parentDeviceStructure = UUID.randomUUID(); + String index = "ty"; + String description = "op"; String systemStructure = "qw"; String deviceStructure = "er"; - String index = "ty"; String name = "ui"; - String description = "op"; Status status = Status.APPROVED; Boolean latest = Boolean.TRUE; Boolean deleted = Boolean.FALSE; @@ -408,18 +386,16 @@ class NameElementUtilTest { String comment = "df"; NameElement element = NameElementUtil.getNameElement( - uuid, - parentSystemStructure, parentDeviceStructure, - systemStructure, deviceStructure, - index, name, - description, status, latest, deleted, + uuid, parentSystemStructure, parentDeviceStructure, + index, description, + systemStructure, deviceStructure, name, + status, latest, deleted, when, who, comment); NameElementCommandConfirm commandConfirm = NameElementUtil.convertElement2CommandConfirm(element); assertNotNull(commandConfirm); assertEquals(uuid, commandConfirm.getUuid()); - assertEquals(comment, commandConfirm.getComment()); NameElementCommandConfirm[] commandConfirm2 = NameElementUtil.convertElement2CommandConfirm(new NameElement[] {element}); @@ -427,7 +403,6 @@ class NameElementUtilTest { assertEquals(1, commandConfirm2.length); assertNotNull(commandConfirm2[0]); assertEquals(uuid, commandConfirm2[0].getUuid()); - assertEquals(comment, commandConfirm2[0].getComment()); } } diff --git a/src/test/java/org/openepics/names/util/StructureElementUtilTest.java b/src/test/java/org/openepics/names/util/StructureElementUtilTest.java index eed41ecde2a61d1c3c9370f7239635587314adbd..eda0b66ae900d0c810c5e2001b358d629c5b2aad 100644 --- a/src/test/java/org/openepics/names/util/StructureElementUtilTest.java +++ b/src/test/java/org/openepics/names/util/StructureElementUtilTest.java @@ -53,10 +53,10 @@ class StructureElementUtilTest { Type type = Type.DEVICETYPE; UUID parent = UUID.randomUUID(); String mnemonic = "jk"; - String mnemonicPath = "zx"; Integer ordering = 41; - Integer level = 3; String description = "cv"; + String mnemonicPath = "zx"; + Integer level = 3; Status status = Status.PENDING; Boolean latest = Boolean.FALSE; Boolean deleted = Boolean.FALSE; @@ -65,11 +65,10 @@ class StructureElementUtilTest { String comment = "ml"; StructureElement structureElement = StructureElementUtil.getStructureElement( - uuid, - type, - parent, - mnemonic, mnemonicPath, ordering, level, - description, status, latest, deleted, + uuid, type, parent, + mnemonic, ordering, description, + mnemonicPath, level, + status, latest, deleted, when, who, comment); assertNotNull(structureElement); @@ -132,10 +131,9 @@ class StructureElementUtilTest { UUID uuid2 = UUID.randomUUID(); String str2 = "asdf"; String str3 = "zxcv"; - String str4 = "tyui"; Integer int1 = 41; - StructureElementCommandCreate commandCreate = new StructureElementCommandCreate(type, uuid2, str2, int1, str3, str4); + StructureElementCommandCreate commandCreate = new StructureElementCommandCreate(type, uuid2, str2, int1, str3); StructureElementCommand command = StructureElementUtil.convertCommandCreate2Command(commandCreate); assertNull(command.getUuid()); @@ -144,7 +142,6 @@ class StructureElementUtilTest { assertEquals(str2, command.getMnemonic()); assertEquals(int1, command.getOrdering()); assertEquals(str3, command.getDescription()); - assertEquals(str4, command.getComment()); } /** @@ -157,10 +154,9 @@ class StructureElementUtilTest { UUID uuid2 = UUID.randomUUID(); String str2 = "asdf"; String str3 = "zxcv"; - String str4 = "tyui"; Integer int1 = 41; - StructureElementCommandUpdate commandUpdate = new StructureElementCommandUpdate(uuid1, type, uuid2, str2, int1, str3, str4); + StructureElementCommandUpdate commandUpdate = new StructureElementCommandUpdate(uuid1, type, uuid2, str2, int1, str3); StructureElementCommand command = StructureElementUtil.convertCommandUpdate2Command(commandUpdate); assertEquals(uuid1, command.getUuid()); @@ -169,7 +165,6 @@ class StructureElementUtilTest { assertEquals(str2, command.getMnemonic()); assertEquals(int1, command.getOrdering()); assertEquals(str3, command.getDescription()); - assertEquals(str4, command.getComment()); } /** @@ -179,9 +174,8 @@ class StructureElementUtilTest { void convertCommandConfirm2Command() { UUID uuid1 = UUID.randomUUID(); Type type = Type.SUBSYSTEM; - String str4 = "tyui"; - StructureElementCommandConfirm commandConfirm = new StructureElementCommandConfirm(uuid1, type, str4); + StructureElementCommandConfirm commandConfirm = new StructureElementCommandConfirm(uuid1, type); StructureElementCommand command = StructureElementUtil.convertCommandConfirm2Command(commandConfirm); assertEquals(uuid1, command.getUuid()); @@ -190,7 +184,6 @@ class StructureElementUtilTest { assertNull(command.getMnemonic()); assertNull(command.getOrdering()); assertNull(command.getDescription()); - assertEquals(str4, command.getComment()); } // ---------------------------------------------------------------------------------------------------- @@ -205,10 +198,9 @@ class StructureElementUtilTest { UUID uuid2 = UUID.randomUUID(); String str2 = "asdf"; String str3 = "zxcv"; - String str4 = "tyui"; Integer int1 = 41; - StructureElementCommand command = new StructureElementCommand(uuid1, type, uuid2, str2, int1, str3, str4); + StructureElementCommand command = new StructureElementCommand(uuid1, type, uuid2, str2, int1, str3); StructureElementCommandCreate commandCreate = StructureElementUtil.convertCommand2CommandCreate(command); assertNotNull(commandCreate); @@ -217,7 +209,6 @@ class StructureElementUtilTest { assertEquals(str2, commandCreate.getMnemonic()); assertEquals(int1, command.getOrdering()); assertEquals(str3, commandCreate.getDescription()); - assertEquals(str4, commandCreate.getComment()); StructureElementCommandCreate[] commandCreate2 = StructureElementUtil.convertCommand2CommandCreate(new StructureElementCommand[] {command}); @@ -229,7 +220,6 @@ class StructureElementUtilTest { assertEquals(str2, commandCreate2[0].getMnemonic()); assertEquals(int1, commandCreate2[0].getOrdering()); assertEquals(str3, commandCreate2[0].getDescription()); - assertEquals(str4, commandCreate2[0].getComment()); } /** @@ -242,10 +232,9 @@ class StructureElementUtilTest { UUID uuid2 = UUID.randomUUID(); String str2 = "asdf"; String str3 = "zxcv"; - String str4 = "tyui"; Integer int1 = 41; - StructureElementCommand command = new StructureElementCommand(uuid1, type, uuid2, str2, int1, str3, str4); + StructureElementCommand command = new StructureElementCommand(uuid1, type, uuid2, str2, int1, str3); StructureElementCommandUpdate commandUpdate = StructureElementUtil.convertCommand2CommandUpdate(command); assertNotNull(commandUpdate); @@ -255,7 +244,6 @@ class StructureElementUtilTest { assertEquals(str2, commandUpdate.getMnemonic()); assertEquals(int1, commandUpdate.getOrdering()); assertEquals(str3, commandUpdate.getDescription()); - assertEquals(str4, commandUpdate.getComment()); StructureElementCommandUpdate[] commandUpdate2 = StructureElementUtil.convertCommand2CommandUpdate(new StructureElementCommand[] {command}); @@ -268,7 +256,6 @@ class StructureElementUtilTest { assertEquals(str2, commandUpdate2[0].getMnemonic()); assertEquals(int1, commandUpdate2[0].getOrdering()); assertEquals(str3, commandUpdate2[0].getDescription()); - assertEquals(str4, commandUpdate2[0].getComment()); } /** @@ -281,16 +268,14 @@ class StructureElementUtilTest { UUID uuid2 = UUID.randomUUID(); String str2 = "asdf"; String str3 = "zxcv"; - String str4 = "tyui"; Integer int1 = 41; - StructureElementCommand command = new StructureElementCommand(uuid1, type, uuid2, str2, int1, str3, str4); + StructureElementCommand command = new StructureElementCommand(uuid1, type, uuid2, str2, int1, str3); StructureElementCommandConfirm commandConfirm = StructureElementUtil.convertCommand2CommandConfirm(command); assertNotNull(commandConfirm); assertEquals(uuid1, commandConfirm.getUuid()); assertEquals(type, commandConfirm.getType()); - assertEquals(str4, commandConfirm.getComment()); StructureElementCommandConfirm[] commandConfirm2 = StructureElementUtil.convertCommand2CommandConfirm(new StructureElementCommand[] {command}); @@ -299,7 +284,6 @@ class StructureElementUtilTest { assertNotNull(commandConfirm2[0]); assertEquals(uuid1, commandConfirm2[0].getUuid()); assertEquals(type, commandConfirm2[0].getType()); - assertEquals(str4, commandConfirm2[0].getComment()); } // ---------------------------------------------------------------------------------------------------- @@ -313,10 +297,10 @@ class StructureElementUtilTest { Type type = Type.DEVICETYPE; UUID parent = UUID.randomUUID(); String mnemonic = "jk"; - String mnemonicPath = "zx"; Integer ordering = 41; - Integer level = 3; String description = "cv"; + String mnemonicPath = "zx"; + Integer level = 3; Status status = Status.PENDING; Boolean latest = Boolean.FALSE; Boolean deleted = Boolean.FALSE; @@ -325,11 +309,10 @@ class StructureElementUtilTest { String comment = "ml"; StructureElement element = StructureElementUtil.getStructureElement( - uuid, - type, - parent, - mnemonic, mnemonicPath, ordering, level, - description, status, latest, deleted, + uuid, type, parent, + mnemonic, ordering, description, + mnemonicPath, level, + status, latest, deleted, when, who, comment); StructureElementCommandCreate commandCreate = StructureElementUtil.convertElement2CommandCreate(element); @@ -340,7 +323,6 @@ class StructureElementUtilTest { assertEquals(mnemonic, commandCreate.getMnemonic()); assertEquals(ordering, commandCreate.getOrdering()); assertEquals(description, commandCreate.getDescription()); - assertEquals(comment, commandCreate.getComment()); StructureElementCommandCreate[] commandCreate2 = StructureElementUtil.convertElement2CommandCreate(new StructureElement[] {element}); @@ -352,7 +334,6 @@ class StructureElementUtilTest { assertEquals(mnemonic, commandCreate2[0].getMnemonic()); assertEquals(ordering, commandCreate2[0].getOrdering()); assertEquals(description, commandCreate2[0].getDescription()); - assertEquals(comment, commandCreate2[0].getComment()); } /** @@ -364,10 +345,10 @@ class StructureElementUtilTest { Type type = Type.DEVICETYPE; UUID parent = UUID.randomUUID(); String mnemonic = "jk"; - String mnemonicPath = "zx"; Integer ordering = 41; - Integer level = 3; String description = "cv"; + String mnemonicPath = "zx"; + Integer level = 3; Status status = Status.PENDING; Boolean latest = Boolean.FALSE; Boolean deleted = Boolean.FALSE; @@ -376,11 +357,10 @@ class StructureElementUtilTest { String comment = "ml"; StructureElement element = StructureElementUtil.getStructureElement( - uuid, - type, - parent, - mnemonic, mnemonicPath, ordering, level, - description, status, latest, deleted, + uuid, type, parent, + mnemonic, ordering, description, + mnemonicPath, level, + status, latest, deleted, when, who, comment); StructureElementCommandUpdate commandUpdate = StructureElementUtil.convertElement2CommandUpdate(element); @@ -392,7 +372,6 @@ class StructureElementUtilTest { assertEquals(mnemonic, commandUpdate.getMnemonic()); assertEquals(ordering, commandUpdate.getOrdering()); assertEquals(description, commandUpdate.getDescription()); - assertEquals(comment, commandUpdate.getComment()); StructureElementCommandUpdate[] commandUpdate2 = StructureElementUtil.convertElement2CommandUpdate(new StructureElement[] {element}); @@ -405,7 +384,6 @@ class StructureElementUtilTest { assertEquals(mnemonic, commandUpdate2[0].getMnemonic()); assertEquals(ordering, commandUpdate2[0].getOrdering()); assertEquals(description, commandUpdate2[0].getDescription()); - assertEquals(comment, commandUpdate2[0].getComment()); } /** @@ -417,10 +395,10 @@ class StructureElementUtilTest { Type type = Type.DEVICETYPE; UUID parent = UUID.randomUUID(); String mnemonic = "jk"; - String mnemonicPath = "zx"; Integer ordering = 41; - Integer level = 3; String description = "cv"; + String mnemonicPath = "zx"; + Integer level = 3; Status status = Status.PENDING; Boolean latest = Boolean.FALSE; Boolean deleted = Boolean.FALSE; @@ -429,11 +407,10 @@ class StructureElementUtilTest { String comment = "ml"; StructureElement element = StructureElementUtil.getStructureElement( - uuid, - type, - parent, - mnemonic, mnemonicPath, ordering, level, - description, status, latest, deleted, + uuid, type, parent, + mnemonic, ordering, description, + mnemonicPath, level, + status, latest, deleted, when, who, comment); StructureElementCommandConfirm commandConfirm = StructureElementUtil.convertElement2CommandConfirm(element); @@ -441,7 +418,6 @@ class StructureElementUtilTest { assertNotNull(commandConfirm); assertEquals(uuid, commandConfirm.getUuid()); assertEquals(type, commandConfirm.getType()); - assertEquals(comment, commandConfirm.getComment()); StructureElementCommandConfirm[] commandConfirm2 = StructureElementUtil.convertElement2CommandConfirm(new StructureElement[] {element}); @@ -450,7 +426,6 @@ class StructureElementUtilTest { assertNotNull(commandConfirm2[0]); assertEquals(uuid, commandConfirm2[0].getUuid()); assertEquals(type, commandConfirm2[0].getType()); - assertEquals(comment, commandConfirm2[0].getComment()); } } diff --git a/src/test/java/org/openepics/names/util/UtilitiesTest.java b/src/test/java/org/openepics/names/util/UtilitiesTest.java index 9830c533a63330f9bbcee64b9d54e44be86e68cf..9bea51634af995fa2f697f6e851ad08124b1bb59 100644 --- a/src/test/java/org/openepics/names/util/UtilitiesTest.java +++ b/src/test/java/org/openepics/names/util/UtilitiesTest.java @@ -109,11 +109,10 @@ class UtilitiesTest { assertFalse(Utilities.addToCollection(list, structureElement)); structureElement = StructureElementUtil.getStructureElement( - null, - null, - null, - null, null, null, null, - null, null, null, null, + null, null, null, + null, null, null, + null, null, + null, null, null, null, null, null); assertFalse(Utilities.addToCollection(list, structureElement)); @@ -122,11 +121,10 @@ class UtilitiesTest { assertFalse(Utilities.addToCollection(list, structureElement)); structureElement = StructureElementUtil.getStructureElement( - null, - null, - null, - null, null, null, null, - null, null, null, null, + null, null, null, + null, null, null, + null, null, + null, null, null, null, null, null); assertTrue(Utilities.addToCollection(list, structureElement)); assertEquals(1, list.size()); diff --git a/src/test/java/org/openepics/names/util/ValidateUtilTest.java b/src/test/java/org/openepics/names/util/ValidateUtilTest.java index dfc4823cfc1cb636cffe3fddc8fa2d84e238b467..dea17fab449773f669343800db69660e8aa9fd08 100644 --- a/src/test/java/org/openepics/names/util/ValidateUtilTest.java +++ b/src/test/java/org/openepics/names/util/ValidateUtilTest.java @@ -43,48 +43,6 @@ import org.openepics.names.rest.beans.Type; */ class ValidateUtilTest { - /** - * Test of validate input comment. - */ - @Test - void validateInputCommentNull() { - try { - ValidateUtil.validateInputComment(null); - fail(); - } catch (InputNotAvailableException e) { - assertEquals(TextUtil.VALUE_IS_NOT_AVAILABLE, e.getMessage()); - assertEquals(null, e.getDetails()); - assertEquals("comment", e.getField()); - assertEquals(null, e.getCause()); - } catch (Exception e) { - fail(); - } - } - /** - * Test of validate input comment. - */ - @Test - void validateInputCommentEmpty() { - try { - ValidateUtil.validateInputComment(""); - fail(); - } catch (InputNotAvailableException e) { - assertEquals(TextUtil.VALUE_IS_NOT_AVAILABLE, e.getMessage()); - assertEquals("", e.getDetails()); - assertEquals("comment", e.getField()); - assertEquals(null, e.getCause()); - } catch (Exception e) { - fail(); - } - } - /** - * Test of validate input comment. - */ - @Test - void validateInputComment() { - ValidateUtil.validateInputComment("asdf"); - } - /** * Test of validate input description. */ diff --git a/src/test/java/org/openepics/names/util/notification/NotificationNameTest.java b/src/test/java/org/openepics/names/util/notification/NotificationNameTest.java index 0e94bbd8197133fa824077985143854a51b9de9d..3eab2612860afd1614fdd65107343b0b29a8f7e1 100644 --- a/src/test/java/org/openepics/names/util/notification/NotificationNameTest.java +++ b/src/test/java/org/openepics/names/util/notification/NotificationNameTest.java @@ -44,7 +44,7 @@ class NotificationNameTest { UUID.randomUUID(), "oldIndexQ", "oldNameW", "oldDescriptionE", "newIndexR", "newNameT", "newDescriptionY", - "commentU", new Date(), "whoI"); + new Date(), "whoI"); assertNotNull(nn); assertTrue(StringUtils.isNotEmpty(nn.toString())); @@ -57,7 +57,7 @@ class NotificationNameTest { UUID.randomUUID(), "oldIndexO", "oldNameP", "oldDescriptionA", "newIndexS", "newNameD", "newDescriptionF", - "commentG", new Date(), "whoH"); + new Date(), "whoH"); assertNotNull(nn); assertTrue(StringUtils.isNotEmpty(nn.toString())); @@ -70,7 +70,7 @@ class NotificationNameTest { UUID.randomUUID(), "oldIndexJ", "oldNameK", "oldDescriptionL", "newIndexZ", "newNameX", "newDescriptionC", - "commentV", new Date(), "whoB"); + new Date(), "whoB"); assertNotNull(nn); assertTrue(StringUtils.isNotEmpty(nn.toString())); diff --git a/src/test/java/org/openepics/names/util/notification/NotificationStructureTest.java b/src/test/java/org/openepics/names/util/notification/NotificationStructureTest.java index 9c44bdaf57963fb309159b98441b0eeffa00fc3e..1e9ce012d197287797f4c139140c72434ef59039 100644 --- a/src/test/java/org/openepics/names/util/notification/NotificationStructureTest.java +++ b/src/test/java/org/openepics/names/util/notification/NotificationStructureTest.java @@ -45,7 +45,7 @@ class NotificationStructureTest { Type.SYSTEM, UUID.randomUUID(), "oldMnemonicW", "oldMnemonicpathE", "oldDescriptionR", "newMnemonicY", "newMnemonicpathU", "newDescriptionI", - "commentO", new Date(), "whoP"); + new Date(), "whoP"); assertNotNull(ns); assertTrue(StringUtils.isNotEmpty(ns.toString())); @@ -58,7 +58,7 @@ class NotificationStructureTest { Type.DISCIPLINE, UUID.randomUUID(), "oldMnemonicS", "oldMnemonicpathD", "oldDescriptionF", "newMnemonicH", "newMnemonicpathJ", "newDescriptionK", - "commentL", new Date(), "whoZ"); + new Date(), "whoZ"); assertNotNull(ns); assertTrue(StringUtils.isNotEmpty(ns.toString())); @@ -71,7 +71,7 @@ class NotificationStructureTest { Type.DEVICETYPE, UUID.randomUUID(), "oldMnemonicC", "oldMnemonicpathV", "oldDescriptionB", "newMnemonicM", "newMnemonicpathQ", "newDescriptionW", - "commentE", new Date(), "whoR"); + new Date(), "whoR"); assertNotNull(ns); assertTrue(StringUtils.isNotEmpty(ns.toString())); diff --git a/src/test/java/org/openepics/names/util/notification/NotificationUtilTest.java b/src/test/java/org/openepics/names/util/notification/NotificationUtilTest.java index b4265f4213b16055ad498e4e5a43cf9464d0c18a..7f37563437b1363760686a0a328ae876ed6bd58d 100644 --- a/src/test/java/org/openepics/names/util/notification/NotificationUtilTest.java +++ b/src/test/java/org/openepics/names/util/notification/NotificationUtilTest.java @@ -48,19 +48,19 @@ class NotificationUtilTest { UUID.randomUUID(), "oldIndexQ", "oldNameW", "oldDescriptionE", "newIndexR", "newNameT", "newDescriptionY", - "commentU", new Date(), "whoI"); + new Date(), "whoI"); NotificationName nn2 = new NotificationName( NameCommand.UPDATE, UUID.randomUUID(), "oldIndexO", "oldNameP", "oldDescriptionA", "newIndexS", "newNameD", "newDescriptionF", - "commentG", new Date(), "whoH"); + new Date(), "whoH"); NotificationName nn3 = new NotificationName( NameCommand.DELETE, UUID.randomUUID(), "oldIndexJ", "oldNameK", "oldDescriptionL", "newIndexZ", "newNameX", "newDescriptionC", - "commentV", new Date(), "whoB"); + new Date(), "whoB"); List<NotificationName> notifications = Lists.newArrayList(); notifications.add(nn1); @@ -81,19 +81,19 @@ class NotificationUtilTest { Type.SYSTEM, UUID.randomUUID(), "oldMnemonicW", "oldMnemonicpathE", "oldDescriptionR", "newMnemonicY", "newMnemonicpathU", "newDescriptionI", - "commentO", new Date(), "whoP"); + new Date(), "whoP"); NotificationStructure ns2 = new NotificationStructure( StructureCommand.CREATE, StructureCommand.APPROVE, Type.DISCIPLINE, UUID.randomUUID(), "oldMnemonicS", "oldMnemonicpathD", "oldDescriptionF", "newMnemonicH", "newMnemonicpathJ", "newDescriptionK", - "commentL", new Date(), "whoZ"); + new Date(), "whoZ"); NotificationStructure ns3 = new NotificationStructure( StructureCommand.CREATE, StructureCommand.APPROVE, Type.DEVICETYPE, UUID.randomUUID(), "oldMnemonicC", "oldMnemonicpathV", "oldDescriptionB", "newMnemonicM", "newMnemonicpathQ", "newDescriptionW", - "commentE", new Date(), "whoR"); + new Date(), "whoR"); List<NotificationStructure> notifications = Lists.newArrayList(); notifications.add(ns1); diff --git a/src/test/resources/INTEGRATIONTEST_DOCKER_TUTORIAL.md b/src/test/resources/INTEGRATIONTEST_DOCKER_TUTORIAL.md index 6d2a8820e76555ee235b25203cd6b2be97d8eceb..9580f002c5fa6412be9ea762b43dcaba2fd956cf 100644 --- a/src/test/resources/INTEGRATIONTEST_DOCKER_TUTORIAL.md +++ b/src/test/resources/INTEGRATIONTEST_DOCKER_TUTORIAL.md @@ -126,8 +126,7 @@ class StructuresDisciplineIT { structureElementCommand = new StructureElementCommand( null, Type.DISCIPLINE, null, - "Ca", null, - "description", "comment"); + "Ca", null, "description"); structureElementCommandCreate = StructureElementUtil.convertCommand2CommandCreate(structureElementCommand); structureElementCommandConfirm = StructureElementUtil.convertCommand2CommandConfirm(structureElementCommand); @@ -328,8 +327,8 @@ class NamesIT { void readSearchHistoryDeleted() { NameElementCommandCreate nameElementCommandCreate = new NameElementCommandCreate( - subsystem010, deviceTypeFS, "001", - "description", "comment"); + subsystem010, deviceTypeFS, + "001", "description"); ITUtilNames.assertCreate(nameElementCommandCreate); diff --git a/src/test/resources/data/templates/NameElementCommand_create_name.xlsx b/src/test/resources/data/templates/NameElementCommand_create_name.xlsx index 089976615f0091489c96f96b48db39a600dadb04..2100db36f6dd8955548c275608198c5f2eecb870 100644 Binary files a/src/test/resources/data/templates/NameElementCommand_create_name.xlsx and b/src/test/resources/data/templates/NameElementCommand_create_name.xlsx differ diff --git a/src/test/resources/data/templates/NameElementCommand_create_name_NameElement.xlsx b/src/test/resources/data/templates/NameElementCommand_create_name_NameElement.xlsx index 5fdb0d3d03c590949d85f9706087f05f3d79c594..3c6da31db53208e5521b92522af74f90f05b61d4 100644 Binary files a/src/test/resources/data/templates/NameElementCommand_create_name_NameElement.xlsx and b/src/test/resources/data/templates/NameElementCommand_create_name_NameElement.xlsx differ diff --git a/src/test/resources/data/templates/NameElementCommand_create_name_different_column_order.xlsx b/src/test/resources/data/templates/NameElementCommand_create_name_different_column_order.xlsx index 009f4e823e97dc7285c00298aa3a3e4ce7520cf9..4ba89690fa70db00f9422546bfa0ec9468113989 100644 Binary files a/src/test/resources/data/templates/NameElementCommand_create_name_different_column_order.xlsx and b/src/test/resources/data/templates/NameElementCommand_create_name_different_column_order.xlsx differ diff --git a/src/test/resources/data/templates/NameElementCommand_create_name_empty_uuid.xlsx b/src/test/resources/data/templates/NameElementCommand_create_name_empty_uuid.xlsx index 16f03e7acf4294650b9d044fb7a5e8f25a911c0b..6ca9f8fa05b6db03240dc08bab087d2d4eb9365f 100644 Binary files a/src/test/resources/data/templates/NameElementCommand_create_name_empty_uuid.xlsx and b/src/test/resources/data/templates/NameElementCommand_create_name_empty_uuid.xlsx differ diff --git a/src/test/resources/data/templates/NameElementCommand_create_name_incorrect_uuid.xlsx b/src/test/resources/data/templates/NameElementCommand_create_name_incorrect_uuid.xlsx index c61c8890bf487f750e0b49a90f746ec643d4913c..fbc0260bddf7e6e0be4830252073f72e47322ae6 100644 Binary files a/src/test/resources/data/templates/NameElementCommand_create_name_incorrect_uuid.xlsx and b/src/test/resources/data/templates/NameElementCommand_create_name_incorrect_uuid.xlsx differ diff --git a/src/test/resources/data/templates/NameElementCommand_create_name_incorrect_uuid_parentdevicestructure.xlsx b/src/test/resources/data/templates/NameElementCommand_create_name_incorrect_uuid_parentdevicestructure.xlsx index 5468bc1552b4c32b2e65df699483475d4ead03f9..28aae6f65fcf194764801a1e57581ec672fe094c 100644 Binary files a/src/test/resources/data/templates/NameElementCommand_create_name_incorrect_uuid_parentdevicestructure.xlsx and b/src/test/resources/data/templates/NameElementCommand_create_name_incorrect_uuid_parentdevicestructure.xlsx differ diff --git a/src/test/resources/data/templates/NameElementCommand_create_name_incorrect_uuid_parentsystemstructure.xlsx b/src/test/resources/data/templates/NameElementCommand_create_name_incorrect_uuid_parentsystemstructure.xlsx index e89fe3bf82e2cd39a83d32d0919496cac8d23473..47f435c451e4127138f64d55cd937bc564fa36ac 100644 Binary files a/src/test/resources/data/templates/NameElementCommand_create_name_incorrect_uuid_parentsystemstructure.xlsx and b/src/test/resources/data/templates/NameElementCommand_create_name_incorrect_uuid_parentsystemstructure.xlsx differ diff --git a/src/test/resources/data/templates/NameElementCommand_create_name_too_few_columns.xlsx b/src/test/resources/data/templates/NameElementCommand_create_name_too_few_columns.xlsx index e433c6a758dbf253fdead9a1cbdd3514adbee0a0..bc801b23bfe34a66d0ba5bc1f15d28d6ef94f406 100644 Binary files a/src/test/resources/data/templates/NameElementCommand_create_name_too_few_columns.xlsx and b/src/test/resources/data/templates/NameElementCommand_create_name_too_few_columns.xlsx differ diff --git a/src/test/resources/data/templates/NameElementCommand_create_name_too_many_columns.xlsx b/src/test/resources/data/templates/NameElementCommand_create_name_too_many_columns.xlsx index 4853e4b24005aa95e17c6e9758f42dd4c3f937d7..0b16fab92f3d97e414a78775280b419244f89223 100644 Binary files a/src/test/resources/data/templates/NameElementCommand_create_name_too_many_columns.xlsx and b/src/test/resources/data/templates/NameElementCommand_create_name_too_many_columns.xlsx differ diff --git a/src/test/resources/data/templates/NameElementCommand_create_name_too_many_columns_uuid.xlsx b/src/test/resources/data/templates/NameElementCommand_create_name_too_many_columns_uuid.xlsx index 316b20d5eab1e30310d617ed5d6db8ba267adf45..8418032a4634499e5a202f0a25bef1e76394d98a 100644 Binary files a/src/test/resources/data/templates/NameElementCommand_create_name_too_many_columns_uuid.xlsx and b/src/test/resources/data/templates/NameElementCommand_create_name_too_many_columns_uuid.xlsx differ diff --git a/src/test/resources/data/templates/NameElementCommand_create_names.xlsx b/src/test/resources/data/templates/NameElementCommand_create_names.xlsx index 29185eabed54c2f3bc9795bf55d178c1980bab8f..c5357b75b3dbc1b877bc421ea17a2ff27f0c79ef 100644 Binary files a/src/test/resources/data/templates/NameElementCommand_create_names.xlsx and b/src/test/resources/data/templates/NameElementCommand_create_names.xlsx differ diff --git a/src/test/resources/data/templates/StructureElementCommand_create_system.xlsx b/src/test/resources/data/templates/StructureElementCommand_create_system.xlsx index df4ee25e05f030bee11b79506787baaf0d877262..9b013d4318ced2a47bd1347505fc9bda9d8cacc3 100644 Binary files a/src/test/resources/data/templates/StructureElementCommand_create_system.xlsx and b/src/test/resources/data/templates/StructureElementCommand_create_system.xlsx differ diff --git a/src/test/resources/data/templates/StructureElementCommand_create_system_StructureElement.xlsx b/src/test/resources/data/templates/StructureElementCommand_create_system_StructureElement.xlsx index 950faf239ee29b7edcc642278a3a171c152f3baf..f0753712fc1fc340af9136b851f0eaff5294baf6 100644 Binary files a/src/test/resources/data/templates/StructureElementCommand_create_system_StructureElement.xlsx and b/src/test/resources/data/templates/StructureElementCommand_create_system_StructureElement.xlsx differ diff --git a/src/test/resources/data/templates/StructureElementCommand_create_system_different_column_order.xlsx b/src/test/resources/data/templates/StructureElementCommand_create_system_different_column_order.xlsx index f789a9e1a2e0fc3cdb2610f371d10313599f32fd..7baaa52d3e7865bb9e7c383d414491b14536dc14 100644 Binary files a/src/test/resources/data/templates/StructureElementCommand_create_system_different_column_order.xlsx and b/src/test/resources/data/templates/StructureElementCommand_create_system_different_column_order.xlsx differ diff --git a/src/test/resources/data/templates/StructureElementCommand_create_system_empty_uuid.xlsx b/src/test/resources/data/templates/StructureElementCommand_create_system_empty_uuid.xlsx index b27e3424b99410f9d7ff6c72ecf0155f5c88a76c..c02d179b032e8561518d9e604418246f7a0baec9 100644 Binary files a/src/test/resources/data/templates/StructureElementCommand_create_system_empty_uuid.xlsx and b/src/test/resources/data/templates/StructureElementCommand_create_system_empty_uuid.xlsx differ diff --git a/src/test/resources/data/templates/StructureElementCommand_create_system_incorrect_ordering.xlsx b/src/test/resources/data/templates/StructureElementCommand_create_system_incorrect_ordering.xlsx index babc745622c370465c7e9f34ea747315a55e5fe0..0aa6a6fc499083d07548c7d76bb9dfe9c9bc1d87 100644 Binary files a/src/test/resources/data/templates/StructureElementCommand_create_system_incorrect_ordering.xlsx and b/src/test/resources/data/templates/StructureElementCommand_create_system_incorrect_ordering.xlsx differ diff --git a/src/test/resources/data/templates/StructureElementCommand_create_system_incorrect_uuid.xlsx b/src/test/resources/data/templates/StructureElementCommand_create_system_incorrect_uuid.xlsx index aa0029771fcc899724f0a67ada0984e95e2b2812..91cbb147ce21cf82be8493e4d3caf6e8d5e47a5b 100644 Binary files a/src/test/resources/data/templates/StructureElementCommand_create_system_incorrect_uuid.xlsx and b/src/test/resources/data/templates/StructureElementCommand_create_system_incorrect_uuid.xlsx differ diff --git a/src/test/resources/data/templates/StructureElementCommand_create_system_incorrect_uuid_parent.xlsx b/src/test/resources/data/templates/StructureElementCommand_create_system_incorrect_uuid_parent.xlsx index 405ce3397f5093d3ffc772f6652139fb0d7a4f7c..d3f8c4454cdec354322c23107a48ad2c170bd3d2 100644 Binary files a/src/test/resources/data/templates/StructureElementCommand_create_system_incorrect_uuid_parent.xlsx and b/src/test/resources/data/templates/StructureElementCommand_create_system_incorrect_uuid_parent.xlsx differ diff --git a/src/test/resources/data/templates/StructureElementCommand_create_system_too_few_columns.xlsx b/src/test/resources/data/templates/StructureElementCommand_create_system_too_few_columns.xlsx index cac4280d03ccbf24f7114571d75dc1ff97972036..87ceb370b73f631630836108b04806ba6bf56814 100644 Binary files a/src/test/resources/data/templates/StructureElementCommand_create_system_too_few_columns.xlsx and b/src/test/resources/data/templates/StructureElementCommand_create_system_too_few_columns.xlsx differ diff --git a/src/test/resources/data/templates/StructureElementCommand_create_system_too_many_columns.xlsx b/src/test/resources/data/templates/StructureElementCommand_create_system_too_many_columns.xlsx index 1af2f202793a6b0bfd72391c40f12f892aa270b6..1638a2572f24697339226cbffae4c5e871327e02 100644 Binary files a/src/test/resources/data/templates/StructureElementCommand_create_system_too_many_columns.xlsx and b/src/test/resources/data/templates/StructureElementCommand_create_system_too_many_columns.xlsx differ diff --git a/src/test/resources/data/templates/StructureElementCommand_create_system_too_many_columns_uuid.xlsx b/src/test/resources/data/templates/StructureElementCommand_create_system_too_many_columns_uuid.xlsx index a50491adef9f45ac5269d3589602a3198fed2776..e4cd24426f50ec45a26fccf9efb614ae521ecd58 100644 Binary files a/src/test/resources/data/templates/StructureElementCommand_create_system_too_many_columns_uuid.xlsx and b/src/test/resources/data/templates/StructureElementCommand_create_system_too_many_columns_uuid.xlsx differ diff --git a/src/test/resources/data/templates/StructureElementCommand_create_systems.xlsx b/src/test/resources/data/templates/StructureElementCommand_create_systems.xlsx index e9c4898620b30b3cb3987c8471fc5ea2bafaeee4..a90e58144e771d9a5ef2ad78186d5fa80339661e 100644 Binary files a/src/test/resources/data/templates/StructureElementCommand_create_systems.xlsx and b/src/test/resources/data/templates/StructureElementCommand_create_systems.xlsx differ