Compare commits
2 Commits
1a1cb5ea1f
...
ba6478182d
Author | SHA1 | Date | |
---|---|---|---|
ba6478182d | |||
cc639243fc |
@ -5,6 +5,10 @@ import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.kar.archidata.annotation.checker.Checker;
|
||||
import org.kar.archidata.annotation.checker.CollectionItemNotNull;
|
||||
import org.kar.archidata.annotation.checker.CollectionItemUnique;
|
||||
import org.kar.archidata.annotation.checker.CollectionNotEmpty;
|
||||
import org.kar.archidata.dataAccess.QueryOptions;
|
||||
import org.kar.archidata.dataAccess.options.OptionRenameColumn;
|
||||
import org.kar.archidata.dataAccess.options.OverrideTableName;
|
||||
@ -24,6 +28,8 @@ import jakarta.persistence.ManyToMany;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.validation.constraints.DecimalMax;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
@ -197,6 +203,22 @@ public class AnnotationTools {
|
||||
return (Checker[]) annotation;
|
||||
}
|
||||
|
||||
public static DecimalMin getConstraintsDecimalMin(final Field element) {
|
||||
final Annotation[] annotation = element.getDeclaredAnnotationsByType(DecimalMin.class);
|
||||
if (annotation.length == 0) {
|
||||
return null;
|
||||
}
|
||||
return ((DecimalMin) annotation[0]);
|
||||
}
|
||||
|
||||
public static DecimalMax getConstraintsDecimalMax(final Field element) {
|
||||
final Annotation[] annotation = element.getDeclaredAnnotationsByType(DecimalMax.class);
|
||||
if (annotation.length == 0) {
|
||||
return null;
|
||||
}
|
||||
return ((DecimalMax) annotation[0]);
|
||||
}
|
||||
|
||||
public static Long getConstraintsMax(final Field element) {
|
||||
final Annotation[] annotation = element.getDeclaredAnnotationsByType(Max.class);
|
||||
if (annotation.length == 0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.kar.archidata.annotation;
|
||||
package org.kar.archidata.annotation.checker;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -1,4 +1,4 @@
|
||||
package org.kar.archidata.annotation;
|
||||
package org.kar.archidata.annotation.checker;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -1,4 +1,4 @@
|
||||
package org.kar.archidata.annotation;
|
||||
package org.kar.archidata.annotation.checker;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -1,4 +1,4 @@
|
||||
package org.kar.archidata.annotation;
|
||||
package org.kar.archidata.annotation.checker;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -1,4 +1,4 @@
|
||||
package org.kar.archidata.annotation;
|
||||
package org.kar.archidata.annotation.method;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -1,4 +1,4 @@
|
||||
package org.kar.archidata.annotation;
|
||||
package org.kar.archidata.annotation.method;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -1,4 +1,4 @@
|
||||
package org.kar.archidata.dataAccess.options;
|
||||
package org.kar.archidata.checker;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.sql.Timestamp;
|
||||
@ -16,20 +16,26 @@ import java.util.UUID;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.kar.archidata.annotation.AnnotationTools;
|
||||
import org.kar.archidata.annotation.Checker;
|
||||
import org.kar.archidata.annotation.CollectionItemNotNull;
|
||||
import org.kar.archidata.annotation.CollectionItemUnique;
|
||||
import org.kar.archidata.annotation.CollectionNotEmpty;
|
||||
import org.kar.archidata.annotation.checker.Checker;
|
||||
import org.kar.archidata.annotation.checker.CollectionItemNotNull;
|
||||
import org.kar.archidata.annotation.checker.CollectionItemUnique;
|
||||
import org.kar.archidata.annotation.checker.CollectionNotEmpty;
|
||||
import org.kar.archidata.dataAccess.DBAccess;
|
||||
import org.kar.archidata.dataAccess.DataAccess;
|
||||
import org.kar.archidata.dataAccess.QueryCondition;
|
||||
import org.kar.archidata.dataAccess.QueryOptions;
|
||||
import org.kar.archidata.dataAccess.options.CheckFunctionInterface;
|
||||
import org.kar.archidata.dataAccess.options.CheckFunctionVoid;
|
||||
import org.kar.archidata.dataAccess.options.Condition;
|
||||
import org.kar.archidata.dataAccess.options.ConditionChecker;
|
||||
import org.kar.archidata.exception.DataAccessException;
|
||||
import org.kar.archidata.exception.InputException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.validation.constraints.DecimalMax;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
public class CheckJPA<T> implements CheckFunctionInterface {
|
||||
@ -124,6 +130,60 @@ public class CheckJPA<T> implements CheckFunctionInterface {
|
||||
|
||||
final Class<?> type = field.getType();
|
||||
if (type == Long.class || type == long.class) {
|
||||
final DecimalMax maxValueDecimal = AnnotationTools.getConstraintsDecimalMax(field);
|
||||
if (maxValueDecimal != null) {
|
||||
final long maxValue = Long.parseLong(maxValueDecimal.value());
|
||||
final boolean inclusive = maxValueDecimal.inclusive();
|
||||
add(fieldName,
|
||||
(
|
||||
final DBAccess ioDb,
|
||||
final String baseName,
|
||||
final T data,
|
||||
final List<String> modifiedValue,
|
||||
final QueryOptions options) -> {
|
||||
final Object elem = field.get(data);
|
||||
if (elem == null) {
|
||||
return;
|
||||
}
|
||||
final Long elemTyped = (Long) elem;
|
||||
if (inclusive) {
|
||||
if (elemTyped > maxValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too height max: " + maxValue);
|
||||
}
|
||||
} else if (elemTyped >= maxValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too height max: " + maxValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
final DecimalMin minValueDecimal = AnnotationTools.getConstraintsDecimalMin(field);
|
||||
if (minValueDecimal != null) {
|
||||
final long minValue = Long.parseLong(minValueDecimal.value());
|
||||
final boolean inclusive = minValueDecimal.inclusive();
|
||||
add(fieldName,
|
||||
(
|
||||
final DBAccess ioDb,
|
||||
final String baseName,
|
||||
final T data,
|
||||
final List<String> modifiedValue,
|
||||
final QueryOptions options) -> {
|
||||
final Object elem = field.get(data);
|
||||
if (elem == null) {
|
||||
return;
|
||||
}
|
||||
final Long elemTyped = (Long) elem;
|
||||
if (inclusive) {
|
||||
if (elemTyped < minValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too Low min: " + minValue);
|
||||
}
|
||||
} else if (elemTyped <= minValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too Low min: " + minValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
final Long maxValue = AnnotationTools.getConstraintsMax(field);
|
||||
if (maxValue != null) {
|
||||
add(fieldName,
|
||||
@ -190,6 +250,61 @@ public class CheckJPA<T> implements CheckFunctionInterface {
|
||||
}
|
||||
|
||||
} else if (type == Integer.class || type == int.class) {
|
||||
final DecimalMax maxValueDecimal = AnnotationTools.getConstraintsDecimalMax(field);
|
||||
if (maxValueDecimal != null) {
|
||||
final int maxValue = Integer.parseInt(maxValueDecimal.value());
|
||||
final boolean inclusive = maxValueDecimal.inclusive();
|
||||
add(fieldName,
|
||||
(
|
||||
final DBAccess ioDb,
|
||||
final String baseName,
|
||||
final T data,
|
||||
final List<String> modifiedValue,
|
||||
final QueryOptions options) -> {
|
||||
final Object elem = field.get(data);
|
||||
if (elem == null) {
|
||||
return;
|
||||
}
|
||||
final Integer elemTyped = (Integer) elem;
|
||||
if (inclusive) {
|
||||
if (elemTyped > maxValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too height max: " + maxValue);
|
||||
}
|
||||
} else if (elemTyped >= maxValue) {
|
||||
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too height max: " + maxValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
final DecimalMin minValueDecimal = AnnotationTools.getConstraintsDecimalMin(field);
|
||||
if (minValueDecimal != null) {
|
||||
final int minValue = Integer.parseInt(minValueDecimal.value());
|
||||
final boolean inclusive = minValueDecimal.inclusive();
|
||||
add(fieldName,
|
||||
(
|
||||
final DBAccess ioDb,
|
||||
final String baseName,
|
||||
final T data,
|
||||
final List<String> modifiedValue,
|
||||
final QueryOptions options) -> {
|
||||
final Object elem = field.get(data);
|
||||
if (elem == null) {
|
||||
return;
|
||||
}
|
||||
final Integer elemTyped = (Integer) elem;
|
||||
if (inclusive) {
|
||||
if (elemTyped < minValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too Low min: " + minValue);
|
||||
}
|
||||
} else if (elemTyped <= minValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too Low min: " + minValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
final Long maxValueRoot = AnnotationTools.getConstraintsMax(field);
|
||||
if (maxValueRoot != null) {
|
||||
final int maxValue = maxValueRoot.intValue();
|
||||
@ -276,6 +391,60 @@ public class CheckJPA<T> implements CheckFunctionInterface {
|
||||
} else if (type == Boolean.class || type == boolean.class) {
|
||||
|
||||
} else if (type == Float.class || type == float.class) {
|
||||
final DecimalMax maxValueDecimal = AnnotationTools.getConstraintsDecimalMax(field);
|
||||
if (maxValueDecimal != null) {
|
||||
final float maxValue = Float.parseFloat(maxValueDecimal.value());
|
||||
final boolean inclusive = maxValueDecimal.inclusive();
|
||||
add(fieldName,
|
||||
(
|
||||
final DBAccess ioDb,
|
||||
final String baseName,
|
||||
final T data,
|
||||
final List<String> modifiedValue,
|
||||
final QueryOptions options) -> {
|
||||
final Object elem = field.get(data);
|
||||
if (elem == null) {
|
||||
return;
|
||||
}
|
||||
final Float elemTyped = (Float) elem;
|
||||
if (inclusive) {
|
||||
if (elemTyped > maxValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too height max: " + maxValue);
|
||||
}
|
||||
} else if (elemTyped >= maxValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too height max: " + maxValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
final DecimalMin minValueDecimal = AnnotationTools.getConstraintsDecimalMin(field);
|
||||
if (minValueDecimal != null) {
|
||||
final float minValue = Float.parseFloat(minValueDecimal.value());
|
||||
final boolean inclusive = minValueDecimal.inclusive();
|
||||
add(fieldName,
|
||||
(
|
||||
final DBAccess ioDb,
|
||||
final String baseName,
|
||||
final T data,
|
||||
final List<String> modifiedValue,
|
||||
final QueryOptions options) -> {
|
||||
final Object elem = field.get(data);
|
||||
if (elem == null) {
|
||||
return;
|
||||
}
|
||||
final Float elemTyped = (Float) elem;
|
||||
if (inclusive) {
|
||||
if (elemTyped < minValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too Low min: " + minValue);
|
||||
}
|
||||
} else if (elemTyped <= minValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too Low min: " + minValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
final Long maxValueRoot = AnnotationTools.getConstraintsMax(field);
|
||||
if (maxValueRoot != null) {
|
||||
final float maxValue = maxValueRoot.floatValue();
|
||||
@ -291,6 +460,7 @@ public class CheckJPA<T> implements CheckFunctionInterface {
|
||||
return;
|
||||
}
|
||||
final Float elemTyped = (Float) elem;
|
||||
|
||||
if (elemTyped > maxValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too height max: " + maxValue);
|
||||
@ -319,6 +489,60 @@ public class CheckJPA<T> implements CheckFunctionInterface {
|
||||
});
|
||||
}
|
||||
} else if (type == Double.class || type == double.class) {
|
||||
final DecimalMax maxValueDecimal = AnnotationTools.getConstraintsDecimalMax(field);
|
||||
if (maxValueDecimal != null) {
|
||||
final double maxValue = Float.parseFloat(maxValueDecimal.value());
|
||||
final boolean inclusive = maxValueDecimal.inclusive();
|
||||
add(fieldName,
|
||||
(
|
||||
final DBAccess ioDb,
|
||||
final String baseName,
|
||||
final T data,
|
||||
final List<String> modifiedValue,
|
||||
final QueryOptions options) -> {
|
||||
final Object elem = field.get(data);
|
||||
if (elem == null) {
|
||||
return;
|
||||
}
|
||||
final Double elemTyped = (Double) elem;
|
||||
if (inclusive) {
|
||||
if (elemTyped > maxValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too height max: " + maxValue);
|
||||
}
|
||||
} else if (elemTyped >= maxValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too height max: " + maxValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
final DecimalMin minValueDecimal = AnnotationTools.getConstraintsDecimalMin(field);
|
||||
if (minValueDecimal != null) {
|
||||
final double minValue = Float.parseFloat(minValueDecimal.value());
|
||||
final boolean inclusive = minValueDecimal.inclusive();
|
||||
add(fieldName,
|
||||
(
|
||||
final DBAccess ioDb,
|
||||
final String baseName,
|
||||
final T data,
|
||||
final List<String> modifiedValue,
|
||||
final QueryOptions options) -> {
|
||||
final Object elem = field.get(data);
|
||||
if (elem == null) {
|
||||
return;
|
||||
}
|
||||
final Double elemTyped = (Double) elem;
|
||||
if (inclusive) {
|
||||
if (elemTyped < minValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too Low min: " + minValue);
|
||||
}
|
||||
} else if (elemTyped <= minValue) {
|
||||
throw new InputException(baseName + fieldName,
|
||||
"Value too Low min: " + minValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
final Long maxValueRoot = AnnotationTools.getConstraintsMax(field);
|
||||
if (maxValueRoot != null) {
|
||||
final double maxValue = maxValueRoot.doubleValue();
|
@ -7,11 +7,11 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.glassfish.jersey.media.multipart.FormDataParam;
|
||||
import org.kar.archidata.annotation.ARCHIVE;
|
||||
import org.kar.archidata.annotation.AsyncType;
|
||||
import org.kar.archidata.annotation.FormDataOptional;
|
||||
import org.kar.archidata.annotation.RESTORE;
|
||||
import org.kar.archidata.annotation.TypeScriptProgress;
|
||||
import org.kar.archidata.annotation.method.ARCHIVE;
|
||||
import org.kar.archidata.annotation.method.RESTORE;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.ws.rs.Consumes;
|
||||
|
@ -4,9 +4,9 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.kar.archidata.annotation.ARCHIVE;
|
||||
import org.kar.archidata.annotation.AsyncType;
|
||||
import org.kar.archidata.annotation.RESTORE;
|
||||
import org.kar.archidata.annotation.method.ARCHIVE;
|
||||
import org.kar.archidata.annotation.method.RESTORE;
|
||||
import org.kar.archidata.exception.NotFoundException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -2,9 +2,9 @@ package test.kar.archidata.apiExtern.resource;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.kar.archidata.annotation.ARCHIVE;
|
||||
import org.kar.archidata.annotation.AsyncType;
|
||||
import org.kar.archidata.annotation.RESTORE;
|
||||
import org.kar.archidata.annotation.method.ARCHIVE;
|
||||
import org.kar.archidata.annotation.method.RESTORE;
|
||||
import org.kar.archidata.dataAccess.DataAccess;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -0,0 +1,240 @@
|
||||
package test.kar.archidata.checker;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.kar.archidata.exception.InputException;
|
||||
|
||||
import test.kar.archidata.checker.model.JpaBaseModel;
|
||||
import test.kar.archidata.checker.model.JpaBaseModel.JpaBaseModelChecker;
|
||||
|
||||
public class TestJPACheckerDecimalMax {
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxIncludeInteger() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxIncludeInteger = 75;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeInteger = 74;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeInteger = 76;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxIncludeInteger = 100;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxIncludeIntegerObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxIncludeIntegerObject = 75;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeIntegerObject = 74;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeIntegerObject = 76;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxIncludeIntegerObject = 100;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxIncludeLong() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxIncludeLong = 75;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeLong = 74;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeLong = 76;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxIncludeLong = 100;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxIncludeLongObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxIncludeLongObject = 75L;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeLongObject = 74L;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeLongObject = 76L;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxIncludeLongObject = 100L;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxIncludeFloat() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
// can not be tested
|
||||
//data.testDecimalMaxIncludeFloat = 75.56f;
|
||||
//Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeFloat = 75.5599f;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeFloat = 75.5601f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxIncludeFloat = 100f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxIncludeFloatObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxIncludeFloatObject = 75.56f;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeFloatObject = 75.5599f;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeFloatObject = 75.5601f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxIncludeFloatObject = 100f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxIncludeDouble() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
// can not be tested
|
||||
//data.testDecimalMaxIncludeDouble = 75.56d;
|
||||
//Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeDouble = 75.5599d;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeDouble = 75.5601d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxIncludeDouble = 100d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxIncludeDoubleObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
//data.testDecimalMaxIncludeDoubleObject = 75.56d;
|
||||
//Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeDoubleObject = 75.5599d;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxIncludeDoubleObject = 75.5601d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxIncludeDoubleObject = 100d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
// exclude
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxExcludeInteger() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxExcludeInteger = 75;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeInteger = 74;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxExcludeInteger = 76;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeInteger = 100;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxExcludeIntegerObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxExcludeIntegerObject = 75;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeIntegerObject = 74;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxExcludeIntegerObject = 76;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeIntegerObject = 100;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxExcludeLong() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxExcludeLong = 75;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeLong = 74;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxExcludeLong = 76;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeLong = 100;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxExcludeLongObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxExcludeLongObject = 75L;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeLongObject = 74L;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxExcludeLongObject = 76L;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeLongObject = 100L;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxExcludeFloat() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxExcludeFloat = 75.56f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeFloat = 75.5599f;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxExcludeFloat = 75.5601f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeFloat = 100f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxExcludeFloatObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxExcludeFloatObject = 75.56f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeFloatObject = 75.5599f;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxExcludeFloatObject = 75.5601f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeFloatObject = 100f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxExcludeDouble() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxExcludeDouble = 75.56d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeDouble = 75.5599d;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxExcludeDouble = 75.5601d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeDouble = 100d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMaxExcludeDoubleObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMaxExcludeDoubleObject = 75.56d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeDoubleObject = 75.5599d;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMaxExcludeDoubleObject = 75.5601d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMaxExcludeDoubleObject = 100d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,240 @@
|
||||
package test.kar.archidata.checker;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.kar.archidata.exception.InputException;
|
||||
|
||||
import test.kar.archidata.checker.model.JpaBaseModel;
|
||||
import test.kar.archidata.checker.model.JpaBaseModel.JpaBaseModelChecker;
|
||||
|
||||
public class TestJPACheckerDecimalMin {
|
||||
|
||||
@Test
|
||||
public void testDecimalMinIncludeInteger() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinIncludeInteger = -75;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeInteger = -74;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeInteger = -76;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinIncludeInteger = -100;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinIncludeIntegerObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinIncludeIntegerObject = -75;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeIntegerObject = -74;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeIntegerObject = -76;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinIncludeIntegerObject = -100;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinIncludeLong() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinIncludeLong = -75;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeLong = -74;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeLong = -76;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinIncludeLong = -100;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinIncludeLongObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinIncludeLongObject = -75L;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeLongObject = -74L;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeLongObject = -76L;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinIncludeLongObject = -100L;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinIncludeFloat() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinIncludeFloat = -75.56f;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeFloat = -75.5599f;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeFloat = -75.5601f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinIncludeFloat = -100f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinIncludeFloatObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinIncludeFloatObject = -75.56f;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeFloatObject = -75.5599f;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeFloatObject = -75.5601f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinIncludeFloatObject = -100f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinIncludeDouble() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
// can not be tested
|
||||
//data.testDecimalMinIncludeDouble = -75.56d;
|
||||
//Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeDouble = -75.5599d;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeDouble = -75.5601d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinIncludeDouble = -100d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinIncludeDoubleObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
// can not be tested
|
||||
//data.testDecimalMinIncludeDoubleObject = -75.56d;
|
||||
//Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeDoubleObject = -75.5599d;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinIncludeDoubleObject = -75.5601d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinIncludeDoubleObject = -100d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
// exclude
|
||||
|
||||
@Test
|
||||
public void testDecimalMinExcludeInteger() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinExcludeInteger = -75;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeInteger = -74;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinExcludeInteger = -76;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeInteger = -100;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinExcludeIntegerObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinExcludeIntegerObject = -75;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeIntegerObject = -74;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinExcludeIntegerObject = -76;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeIntegerObject = -100;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinExcludeLong() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinExcludeLong = -75;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeLong = -74;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinExcludeLong = -76;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeLong = -100;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinExcludeLongObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinExcludeLongObject = -75L;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeLongObject = -74L;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinExcludeLongObject = -76L;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeLongObject = -100L;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinExcludeFloat() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinExcludeFloat = -75.56f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeFloat = -75.5599f;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinExcludeFloat = -75.5601f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeFloat = -100f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinExcludeFloatObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinExcludeFloatObject = -75.56f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeFloatObject = -75.5599f;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinExcludeFloatObject = -75.5601f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeFloatObject = -100f;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinExcludeDouble() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinExcludeDouble = -75.56d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeDouble = -75.5599d;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinExcludeDouble = -75.5601d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeDouble = -100d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecimalMinExcludeDoubleObject() throws Exception {
|
||||
final JpaBaseModelChecker checker = new JpaBaseModelChecker();
|
||||
final JpaBaseModel data = new JpaBaseModel();
|
||||
data.testDecimalMinExcludeDoubleObject = -75.56d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeDoubleObject = -75.5599d;
|
||||
Assertions.assertDoesNotThrow(() -> checker.check(data));
|
||||
data.testDecimalMinExcludeDoubleObject = -75.5601d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
data.testDecimalMinExcludeDoubleObject = -100d;
|
||||
Assertions.assertThrows(InputException.class, () -> checker.check(data));
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package test.kar.archidata.checker.model;
|
||||
|
||||
import org.kar.archidata.dataAccess.options.CheckJPA;
|
||||
import org.kar.archidata.checker.CheckJPA;
|
||||
|
||||
import jakarta.validation.constraints.DecimalMax;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package test.kar.archidata.dataAccess.model;
|
||||
|
||||
import org.kar.archidata.dataAccess.options.CheckJPA;
|
||||
import org.kar.archidata.checker.CheckJPA;
|
||||
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package test.kar.archidata.dataAccess.model;
|
||||
|
||||
import org.kar.archidata.annotation.Checker;
|
||||
import org.kar.archidata.annotation.DataJson;
|
||||
import org.kar.archidata.dataAccess.options.CheckJPA;
|
||||
import org.kar.archidata.annotation.checker.Checker;
|
||||
import org.kar.archidata.checker.CheckJPA;
|
||||
|
||||
public class DataWithSubJson {
|
||||
// Simple checker declaration
|
||||
|
Loading…
x
Reference in New Issue
Block a user