From 705cb83b26ab8b22eba20a2aedf53351499a6a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eivind=20Bergst=C3=B8l?= Date: Tue, 4 Dec 2018 14:08:53 +0100 Subject: [PATCH] Flytter annotasjon og test til en annen package. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dette var først tenkt som en validering, men ble noe helt annet. --- .../api/datatypes/{validation => }/ComplementedBy.java | 2 +- .../java/no/digipost/api/datatypes/DataTypeIdentifier.java | 1 - .../documentation/DocumentationStructureBuilder.java | 4 +--- .../digipost/api/datatypes/documentation/MarkdownPrinter.java | 3 --- .../no/digipost/api/datatypes/types/pickup/PickupNotice.java | 2 +- .../ComplementValidationTest.java => ComplementByTest.java} | 4 ++-- .../no/digipost/api/datatypes/types/ShortTextMessage.java | 2 +- 7 files changed, 6 insertions(+), 12 deletions(-) rename src/main/java/no/digipost/api/datatypes/{validation => }/ComplementedBy.java (90%) rename src/test/java/no/digipost/api/datatypes/{validation/ComplementValidationTest.java => ComplementByTest.java} (92%) diff --git a/src/main/java/no/digipost/api/datatypes/validation/ComplementedBy.java b/src/main/java/no/digipost/api/datatypes/ComplementedBy.java similarity index 90% rename from src/main/java/no/digipost/api/datatypes/validation/ComplementedBy.java rename to src/main/java/no/digipost/api/datatypes/ComplementedBy.java index de352b83..f2412c44 100644 --- a/src/main/java/no/digipost/api/datatypes/validation/ComplementedBy.java +++ b/src/main/java/no/digipost/api/datatypes/ComplementedBy.java @@ -1,4 +1,4 @@ -package no.digipost.api.datatypes.validation; +package no.digipost.api.datatypes; import no.digipost.api.datatypes.DataType; diff --git a/src/main/java/no/digipost/api/datatypes/DataTypeIdentifier.java b/src/main/java/no/digipost/api/datatypes/DataTypeIdentifier.java index b971dd94..fd667d1e 100644 --- a/src/main/java/no/digipost/api/datatypes/DataTypeIdentifier.java +++ b/src/main/java/no/digipost/api/datatypes/DataTypeIdentifier.java @@ -10,7 +10,6 @@ import no.digipost.api.datatypes.types.pickup.PickupNotice; import no.digipost.api.datatypes.types.pickup.PickupNoticeStatus; import no.digipost.api.datatypes.types.receipt.Receipt; -import no.digipost.api.datatypes.validation.ComplementedBy; import java.util.Collections; import java.util.Map; diff --git a/src/main/java/no/digipost/api/datatypes/documentation/DocumentationStructureBuilder.java b/src/main/java/no/digipost/api/datatypes/documentation/DocumentationStructureBuilder.java index ebff0f79..7976cbce 100644 --- a/src/main/java/no/digipost/api/datatypes/documentation/DocumentationStructureBuilder.java +++ b/src/main/java/no/digipost/api/datatypes/documentation/DocumentationStructureBuilder.java @@ -1,12 +1,11 @@ package no.digipost.api.datatypes.documentation; -import no.digipost.api.datatypes.validation.ComplementedBy; +import no.digipost.api.datatypes.ComplementedBy; import javax.validation.constraints.NotNull; import javax.xml.bind.annotation.XmlElement; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Field; -import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Optional; @@ -19,7 +18,6 @@ import static java.util.stream.Collectors.collectingAndThen; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.toList; -import static java.util.stream.Collectors.toSet; public class DocumentationStructureBuilder { diff --git a/src/main/java/no/digipost/api/datatypes/documentation/MarkdownPrinter.java b/src/main/java/no/digipost/api/datatypes/documentation/MarkdownPrinter.java index 43ccba55..6ba0fb1a 100644 --- a/src/main/java/no/digipost/api/datatypes/documentation/MarkdownPrinter.java +++ b/src/main/java/no/digipost/api/datatypes/documentation/MarkdownPrinter.java @@ -2,9 +2,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.SerializationFeature; -import no.digipost.api.datatypes.DataTypeIdentifier; import no.digipost.api.datatypes.marshalling.DataTypesJsonMapper; -import no.digipost.api.datatypes.validation.ComplementedBy; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; @@ -13,7 +11,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import java.util.stream.Collectors; import java.util.stream.Stream; import static java.lang.System.lineSeparator; diff --git a/src/main/java/no/digipost/api/datatypes/types/pickup/PickupNotice.java b/src/main/java/no/digipost/api/datatypes/types/pickup/PickupNotice.java index 68a03167..fe63a42a 100644 --- a/src/main/java/no/digipost/api/datatypes/types/pickup/PickupNotice.java +++ b/src/main/java/no/digipost/api/datatypes/types/pickup/PickupNotice.java @@ -8,7 +8,7 @@ import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; import no.digipost.api.datatypes.types.receipt.Barcode; -import no.digipost.api.datatypes.validation.ComplementedBy; +import no.digipost.api.datatypes.ComplementedBy; import javax.validation.Valid; import javax.validation.constraints.NotNull; diff --git a/src/test/java/no/digipost/api/datatypes/validation/ComplementValidationTest.java b/src/test/java/no/digipost/api/datatypes/ComplementByTest.java similarity index 92% rename from src/test/java/no/digipost/api/datatypes/validation/ComplementValidationTest.java rename to src/test/java/no/digipost/api/datatypes/ComplementByTest.java index 6c876ca7..719901a9 100644 --- a/src/test/java/no/digipost/api/datatypes/validation/ComplementValidationTest.java +++ b/src/test/java/no/digipost/api/datatypes/ComplementByTest.java @@ -1,4 +1,4 @@ -package no.digipost.api.datatypes.validation; +package no.digipost.api.datatypes; import no.digipost.api.datatypes.types.Appointment; import no.digipost.api.datatypes.types.pickup.PickupNotice; @@ -9,7 +9,7 @@ import static co.unruly.matchers.Java8Matchers.whereNot; import static org.hamcrest.MatcherAssert.assertThat; -public class ComplementValidationTest { +public class ComplementByTest { @Test public void kan_komplementere() { diff --git a/src/test/java/no/digipost/api/datatypes/types/ShortTextMessage.java b/src/test/java/no/digipost/api/datatypes/types/ShortTextMessage.java index 6514bf3b..68fd52bb 100644 --- a/src/test/java/no/digipost/api/datatypes/types/ShortTextMessage.java +++ b/src/test/java/no/digipost/api/datatypes/types/ShortTextMessage.java @@ -6,7 +6,7 @@ import lombok.Value; import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import no.digipost.api.datatypes.validation.ComplementedBy; +import no.digipost.api.datatypes.ComplementedBy; import javax.validation.constraints.Max; import javax.validation.constraints.NotNull;