Fix test.
This commit is contained in:
@@ -73,7 +73,7 @@ public class Label implements Serializable {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(@NotNull String title) {
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class Label implements Serializable {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nullable
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ public class RestLabel {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public void setParent(@NotNull final Label parent) {
|
||||
public void setParent(final Label parent) {
|
||||
this.label.setParent(parent);
|
||||
}
|
||||
|
||||
|
@@ -55,14 +55,23 @@ public class LabelValidator implements Validator {
|
||||
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "title", Messages.FIELD_REQUIRED);
|
||||
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "color", Messages.FIELD_REQUIRED);
|
||||
final String title = label.getTitle();
|
||||
|
||||
ValidatorUtils.rejectIfExceeded(
|
||||
errors,
|
||||
"title",
|
||||
"The description must have less than " + Constants.MAX_LABEL_NAME_LENGTH + " characters.",
|
||||
title,
|
||||
Constants.MAX_LABEL_NAME_LENGTH);
|
||||
|
||||
ValidatorUtils.rejectIfEmptyOrWhitespace(
|
||||
errors,
|
||||
"title",
|
||||
"Label title can not be empty",
|
||||
title);
|
||||
|
||||
final User user = com.wisemapping.security.Utils.getUser();
|
||||
assert user != null;
|
||||
|
||||
final Label foundLabel = service.getLabelByTitle(title, user);
|
||||
if (foundLabel != null) {
|
||||
errors.rejectValue("title", Messages.LABEL_TITLE_ALREADY_EXISTS);
|
||||
|
@@ -12,7 +12,7 @@ spring.sql.init.mode=always
|
||||
spring.sql.init.platform=hsqldb
|
||||
|
||||
# LOG
|
||||
logging.level.root=INFO
|
||||
logging.level.root=DEBUG
|
||||
logging.level.org.apache.tomcat=INFO
|
||||
|
||||
##################################################################################
|
||||
|
Reference in New Issue
Block a user