diff --git a/deepsampler-core/src/main/java/de/ppi/deepsampler/core/api/Matchers.java b/deepsampler-core/src/main/java/de/ppi/deepsampler/core/api/Matchers.java index 796e9937..b0a4abe0 100644 --- a/deepsampler-core/src/main/java/de/ppi/deepsampler/core/api/Matchers.java +++ b/deepsampler-core/src/main/java/de/ppi/deepsampler/core/api/Matchers.java @@ -40,7 +40,7 @@ * There are two things you have to care about when using matchers: *

* * To use your own matcher you have to implement {@link ParameterMatcher} and call {@link Matchers#matcher(ParameterMatcher)} withing the method diff --git a/deepsampler-core/src/main/java/de/ppi/deepsampler/core/api/Sample.java b/deepsampler-core/src/main/java/de/ppi/deepsampler/core/api/Sample.java index 7d765083..df869051 100644 --- a/deepsampler-core/src/main/java/de/ppi/deepsampler/core/api/Sample.java +++ b/deepsampler-core/src/main/java/de/ppi/deepsampler/core/api/Sample.java @@ -27,7 +27,7 @@ * the Sampler manually and to distribute the Sampler into the objects that will be tested. The distribution is done by a Dependency Injection Framework like Spring or Guice. * * Methods of the class {@link Object} are ignored. Otherwise strange effects might appear, e.g. if Object::finalize is - * called by the garbage collactor. + * called by the garbage collector. * * @author Jan Schankin, Rico Schrage */ diff --git a/deepsampler-core/src/main/java/de/ppi/deepsampler/core/error/NoMatchingParametersFoundException.java b/deepsampler-core/src/main/java/de/ppi/deepsampler/core/error/NoMatchingParametersFoundException.java index 45460099..753f18bb 100644 --- a/deepsampler-core/src/main/java/de/ppi/deepsampler/core/error/NoMatchingParametersFoundException.java +++ b/deepsampler-core/src/main/java/de/ppi/deepsampler/core/error/NoMatchingParametersFoundException.java @@ -4,7 +4,6 @@ import de.ppi.deepsampler.core.model.SampledMethod; import java.util.Arrays; -import java.util.Collection; import java.util.List; import java.util.stream.Collectors; diff --git a/deepsampler-core/src/main/java/de/ppi/deepsampler/core/model/SampleExecutionInformation.java b/deepsampler-core/src/main/java/de/ppi/deepsampler/core/model/SampleExecutionInformation.java index dde1741e..01bb88f3 100644 --- a/deepsampler-core/src/main/java/de/ppi/deepsampler/core/model/SampleExecutionInformation.java +++ b/deepsampler-core/src/main/java/de/ppi/deepsampler/core/model/SampleExecutionInformation.java @@ -11,7 +11,7 @@ public class SampleExecutionInformation { - private SampleDefinition sampleDefinition; + private final SampleDefinition sampleDefinition; private final List methodCallList = new ArrayList<>(); public SampleExecutionInformation(SampleDefinition sampleDefinition) { diff --git a/deepsampler-junit/src/test/java/de/ppi/deepsampler/junit/JUnitSamplerUtilsTest.java b/deepsampler-junit/src/test/java/de/ppi/deepsampler/junit/JUnitSamplerUtilsTest.java index 5b8b6c57..154a4488 100644 --- a/deepsampler-junit/src/test/java/de/ppi/deepsampler/junit/JUnitSamplerUtilsTest.java +++ b/deepsampler-junit/src/test/java/de/ppi/deepsampler/junit/JUnitSamplerUtilsTest.java @@ -5,8 +5,6 @@ package de.ppi.deepsampler.junit; -import de.ppi.deepsampler.core.api.Sampler; -import de.ppi.deepsampler.core.model.SampleRepository; import org.junit.jupiter.api.Test; import java.lang.reflect.Field; diff --git a/deepsampler-junit/src/testFixtures/java/de/ppi/deepsampler/junit/MyInstantDeserializer.java b/deepsampler-junit/src/testFixtures/java/de/ppi/deepsampler/junit/MyInstantDeserializer.java index 4ea3e362..1a18bbec 100644 --- a/deepsampler-junit/src/testFixtures/java/de/ppi/deepsampler/junit/MyInstantDeserializer.java +++ b/deepsampler-junit/src/testFixtures/java/de/ppi/deepsampler/junit/MyInstantDeserializer.java @@ -15,7 +15,7 @@ /** * A simple {@link JsonDeserializer} that is used to test the annotations {@link UseJsonSerializer} and {@link UseJsonDeserializer} *

- * {@link MyInstantSerializer} writes an {@link Instant} in a JSON-file and adds a suffix {@link MyInstantSerializer#TEST_SUFFIX_TO_ENSURE_THAT_SERIALZER_WAS_USED} + * {@link MyInstantSerializer} writes an {@link Instant} in a JSON-file and adds a suffix {@link MyInstantSerializer#TEST_SUFFIX_TO_ENSURE_THAT_SERIALIZER_WAS_USED} * to the persistent Instant. This suffix is used by this {@link MyInstantDeserializer} to ensure that the {@link Instant} was saved by {@link MyInstantSerializer} * and not by the standard Jackson-Serializer or a standard {@link de.ppi.deepsampler.persistence.model.PersistentBean}. */ @@ -23,13 +23,13 @@ public class MyInstantDeserializer extends JsonDeserializer { @Override public Instant deserialize(final JsonParser p, final DeserializationContext ctxt) throws IOException { - if (!p.getValueAsString().contains(MyInstantSerializer.TEST_SUFFIX_TO_ENSURE_THAT_SERIALZER_WAS_USED)) { + if (!p.getValueAsString().contains(MyInstantSerializer.TEST_SUFFIX_TO_ENSURE_THAT_SERIALIZER_WAS_USED)) { throw new IllegalStateException("The deserialized value was not written by MyInstantSerializer, because the suffix " - + MyInstantSerializer.TEST_SUFFIX_TO_ENSURE_THAT_SERIALZER_WAS_USED + + MyInstantSerializer.TEST_SUFFIX_TO_ENSURE_THAT_SERIALIZER_WAS_USED + " is missing."); } - final String cleanedInstant = p.getValueAsString().replaceAll(MyInstantSerializer.TEST_SUFFIX_TO_ENSURE_THAT_SERIALZER_WAS_USED, ""); + final String cleanedInstant = p.getValueAsString().replaceAll(MyInstantSerializer.TEST_SUFFIX_TO_ENSURE_THAT_SERIALIZER_WAS_USED, ""); return Instant.from(MyInstantSerializer.ISO_LOCAL_DATE.parse(cleanedInstant)); } } diff --git a/deepsampler-junit/src/testFixtures/java/de/ppi/deepsampler/junit/MyInstantSerializer.java b/deepsampler-junit/src/testFixtures/java/de/ppi/deepsampler/junit/MyInstantSerializer.java index 7d03a6c9..cbbc1706 100644 --- a/deepsampler-junit/src/testFixtures/java/de/ppi/deepsampler/junit/MyInstantSerializer.java +++ b/deepsampler-junit/src/testFixtures/java/de/ppi/deepsampler/junit/MyInstantSerializer.java @@ -21,13 +21,13 @@ /** * A simple {@link JsonSerializer} that is used to test the annotations {@link UseJsonSerializer} and {@link UseJsonDeserializer} *

- * The serialzer writes an {@link Instant} in a JSON-file and adds a suffix {@link MyInstantSerializer#TEST_SUFFIX_TO_ENSURE_THAT_SERIALZER_WAS_USED} + * The serializer writes an {@link Instant} in a JSON-file and adds a suffix {@link MyInstantSerializer#TEST_SUFFIX_TO_ENSURE_THAT_SERIALIZER_WAS_USED} * to the persistent Instant. This suffix is used by {@link MyInstantDeserializer} to ensure that the {@link Instant} was saved by this {@link JsonSerializer} * and not by the standard Jackson-Serializer or a standard {@link de.ppi.deepsampler.persistence.model.PersistentBean}. */ public class MyInstantSerializer extends JsonSerializer { - public static final String TEST_SUFFIX_TO_ENSURE_THAT_SERIALZER_WAS_USED = "_Test"; + public static final String TEST_SUFFIX_TO_ENSURE_THAT_SERIALIZER_WAS_USED = "_Test"; public static final DateTimeFormatter ISO_LOCAL_DATE = DateTimeFormatter.ISO_LOCAL_DATE_TIME .withLocale(Locale.GERMANY) .withZone(ZoneId.of("UTC")); @@ -35,7 +35,7 @@ public class MyInstantSerializer extends JsonSerializer { @Override public void serialize(final Instant value, final JsonGenerator gen, final SerializerProvider serializers) throws IOException { final String formattedDate = ISO_LOCAL_DATE.format(value); - gen.writeString(formattedDate + TEST_SUFFIX_TO_ENSURE_THAT_SERIALZER_WAS_USED); + gen.writeString(formattedDate + TEST_SUFFIX_TO_ENSURE_THAT_SERIALIZER_WAS_USED); } @Override diff --git a/deepsampler-junit4/src/test/java/de/ppi/deepsampler/junit4/BeanExtensionTest.java b/deepsampler-junit4/src/test/java/de/ppi/deepsampler/junit4/BeanExtensionTest.java index fd86c8a4..fb328652 100644 --- a/deepsampler-junit4/src/test/java/de/ppi/deepsampler/junit4/BeanExtensionTest.java +++ b/deepsampler-junit4/src/test/java/de/ppi/deepsampler/junit4/BeanExtensionTest.java @@ -32,7 +32,7 @@ public class BeanExtensionTest { public static final Path EXPECTED_SAVED_SAMPLER = Paths.get(SAVED_SAMPLER_FILE); public static final String CATS_NAME_AS_IT_SHOULD_BE_RECORDED = "Cats name that should be recorded and written to the json file"; - public static final String CATS_NAME_FOR_CROSS_CHECK = "This name is unstubbd"; + public static final String CATS_NAME_FOR_CROSS_CHECK = "This name is unstubbed"; @Inject diff --git a/deepsampler-junit4/src/test/java/de/ppi/deepsampler/junit4/SamplerFixtureTest.java b/deepsampler-junit4/src/test/java/de/ppi/deepsampler/junit4/SamplerFixtureTest.java index f3a50025..998bd3ec 100644 --- a/deepsampler-junit4/src/test/java/de/ppi/deepsampler/junit4/SamplerFixtureTest.java +++ b/deepsampler-junit4/src/test/java/de/ppi/deepsampler/junit4/SamplerFixtureTest.java @@ -13,7 +13,6 @@ import static de.ppi.deepsampler.junit.JUnitTestUtility.assertTestBeanHasStubbedInt; import static de.ppi.deepsampler.junit.JUnitTestUtility.assertTestBeanHasStubbedString; -import static org.junit.Assert.assertTrue; @FixMethodOrder(MethodSorters.NAME_ASCENDING) @UseSamplerFixture(TestSampleFixture.class) diff --git a/deepsampler-junit5/src/test/java/de/ppi/deepsampler/junit5/BeanExtensionTest.java b/deepsampler-junit5/src/test/java/de/ppi/deepsampler/junit5/BeanExtensionTest.java index 3be98a30..982a0857 100644 --- a/deepsampler-junit5/src/test/java/de/ppi/deepsampler/junit5/BeanExtensionTest.java +++ b/deepsampler-junit5/src/test/java/de/ppi/deepsampler/junit5/BeanExtensionTest.java @@ -29,7 +29,7 @@ class BeanExtensionTest { public static final Path EXPECTED_SAVED_SAMPLER = Paths.get(SAVED_SAMPLER_FILE); public static final String CATS_NAME_AS_IT_SHOULD_BE_RECORDED = "Cats name that should be recorded and written to the json file"; - public static final String CATS_NAME_FOR_CROSS_CHECK = "This name is unstubbd"; + public static final String CATS_NAME_FOR_CROSS_CHECK = "This name is unstubbed"; @Inject diff --git a/deepsampler-persistence-json/src/main/java/de/ppi/deepsampler/persistence/json/JsonOperator.java b/deepsampler-persistence-json/src/main/java/de/ppi/deepsampler/persistence/json/JsonOperator.java index 43164129..0c510427 100644 --- a/deepsampler-persistence-json/src/main/java/de/ppi/deepsampler/persistence/json/JsonOperator.java +++ b/deepsampler-persistence-json/src/main/java/de/ppi/deepsampler/persistence/json/JsonOperator.java @@ -17,8 +17,6 @@ import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.fasterxml.jackson.module.paramnames.ParameterNamesModule; -import de.ppi.deepsampler.persistence.json.extension.PlainByteArrayDeserializer; -import de.ppi.deepsampler.persistence.json.extension.PlainByteArraySerializer; import de.ppi.deepsampler.persistence.json.extension.DeserializationExtension; import de.ppi.deepsampler.persistence.json.extension.SerializationExtension; diff --git a/deepsampler-persistence-json/src/main/java/de/ppi/deepsampler/persistence/json/extension/PlainByteArraySerializer.java b/deepsampler-persistence-json/src/main/java/de/ppi/deepsampler/persistence/json/extension/PlainByteArraySerializer.java index 4e035c09..be0be5b4 100644 --- a/deepsampler-persistence-json/src/main/java/de/ppi/deepsampler/persistence/json/extension/PlainByteArraySerializer.java +++ b/deepsampler-persistence-json/src/main/java/de/ppi/deepsampler/persistence/json/extension/PlainByteArraySerializer.java @@ -3,7 +3,6 @@ import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.core.type.WritableTypeId; -import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.jsontype.TypeSerializer; import com.fasterxml.jackson.databind.ser.std.StdSerializer; @@ -34,11 +33,11 @@ public void serialize(byte[] value, JsonGenerator gen, SerializerProvider serial /** * Adds serialization-capabilities for polymorphic types. * - * @param value - * @param gen - * @param serializers - * @param typeSer - * @throws IOException + * @param value {@inheritDoc} + * @param gen {@inheritDoc} + * @param serializers {@inheritDoc} + * @param typeSer {@inheritDoc} + * @throws IOException {@inheritDoc} * @see Stackoverflow */ @Override diff --git a/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/api/ComboMatcher.java b/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/api/ComboMatcher.java index 403b802b..18d47c1b 100644 --- a/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/api/ComboMatcher.java +++ b/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/api/ComboMatcher.java @@ -25,7 +25,7 @@ public class ComboMatcher implements ParameterMatcher { /** * Create a ComboMatcher with the parameterMatcher to be imitated and the persistentMatcher to hold for the later creating of a real matcher - * in the proces of loading persistent samples. + * in the process of loading persistent samples. * * @param parameterMatcher the {@link ParameterMatcher} to imitate * @param persistentMatcher the {@link PersistentMatcher} to hold diff --git a/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/PolymorphicPersistentBean.java b/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/PolymorphicPersistentBean.java index 90500a93..175dbed6 100644 --- a/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/PolymorphicPersistentBean.java +++ b/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/PolymorphicPersistentBean.java @@ -7,7 +7,7 @@ */ public class PolymorphicPersistentBean extends DefaultPersistentBean { /** - * contains the true type of the object for deserialization purpose asstring + * Contains the true type of the object for deserialization purpose as string */ private String polymorphicBeanType; diff --git a/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/ReflectionTools.java b/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/ReflectionTools.java index 6c8fdbe2..f8e034cc 100644 --- a/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/ReflectionTools.java +++ b/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/ReflectionTools.java @@ -18,11 +18,11 @@ private ReflectionTools() { /** * Checks if cls is an Array with a complex component type. This is the case if the component type is not a primitive type - * nor one of its wrapper types. Multidimensional arrays, thus arrays in arrays are also treated as primitve arrays if the component type - * of the deepest not array type is a primitve. + * nor one of its wrapper types. Multidimensional arrays, thus arrays in arrays are also treated as primitive arrays if the component type + * of the deepest not array type is a primitive. * * @param cls The class of the suspected array - * @return true if cls is an array with elements that have a Type that is not primitive nor a primitve wrapper. + * @return true if cls is an array with elements that have a Type that is not primitive nor a primitive wrapper. */ public static boolean isObjectArray(final Class cls) { if (!cls.isArray()) { @@ -55,8 +55,8 @@ public static boolean isObjectArray(final Class cls) { /** * Checks if cls is a primitive type or one of its wrapper types i.e. Integer for int. * - * @param cls The suspected primitve type - * @return true it cls is a primitve or a wrapper like int and Integer. + * @param cls The suspected primitive type + * @return true it cls is a primitive or a wrapper like int and Integer. */ public static boolean isPrimitiveOrWrapper(final Class cls) { return cls.isPrimitive() @@ -87,7 +87,7 @@ public static boolean hasPrimitiveTypeParameters(Type type) { * (Real primitives cannot occur here, because primitives are not allowed as generic type parameters.) * * @param type The generic class that should be checked. - * @param numberOfParametersToCheck The number of the first generic parameters that should be chekced. + * @param numberOfParametersToCheck The number of the first generic parameters that should be checked. * @return true if cls has generic type parameters that are wrapper types. */ public static boolean hasPrimitiveTypeParameters(Type type, int numberOfParametersToCheck) { @@ -149,7 +149,7 @@ public static Class getClass(Type type) { * Creates an empty array. The dimensions of the new array will be the same as of templateArray. The componentType of the * new array will be newArrayType. * - * @param templateArray A template array that is used as an example for the deimensions of the new array. + * @param templateArray A template array that is used as an example for the dimensions of the new array. * @param newArrayType the componentType of the new array * @param the componentType of the new array * @return the new array formed after templateArray and newArrayType. diff --git a/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/ext/BeanConverterExtension.java b/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/ext/BeanConverterExtension.java index d8d2eac4..5099ec24 100644 --- a/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/ext/BeanConverterExtension.java +++ b/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/ext/BeanConverterExtension.java @@ -19,20 +19,15 @@ * java beans. Also it will convert back this data-structures to the original objects. * The reason for this is to omit the type information when serializing objects. *

- * - *
- * *

- * As this is a highly generic and complicated process deepsampler offers extensions + * As this is a highly generic and complicated process DeepSampler offers extensions * for this BeanFactory the {@link BeanConverterExtension}. To add an extension you have - * to specifiy it when recording/loading samples with {@link de.ppi.deepsampler.persistence.api.PersistentSampler} + * to specify it when recording/loading samples with {@link de.ppi.deepsampler.persistence.api.PersistentSampler} * ({@link de.ppi.deepsampler.persistence.api.PersistentSampleManager#addBeanExtension(BeanConverterExtension)}. *

- *
*

* The extension will be used for all processed objects (including embedded objects). *

- *
*

* When you write an extension you firstly have to define for which type you * want to extend the behavior of the original BeanFactory. For this purpose you @@ -56,8 +51,8 @@ public interface BeanConverterExtension { * Checks it this extension is responsible for objects of the type beanType. * * @param beanClass the {@link Class} of the type that will be processed by this extension. - * @param beanType the {@link ParameterizedType} of the type that will be processed by this extension. This parameter can only be supplied - * if the type is actually a generic type. If this is not the case, beanType is null. + * @param beanType the {@link ParameterizedType} of the type that will be processed by this extension. This parameter can only be supplied + * if the type is actually a generic type. If this is not the case, beanType is null. * @return true if the {@link Type} should be processed within this extension, false otherwise */ @@ -68,8 +63,8 @@ public interface BeanConverterExtension { * persistence api. Therefore the persistence api must be able to handle the serialization / deserialization. * * @param beanClass the {@link Class}of the type that will be skipped by this extension. - * @param beanType the {@link ParameterizedType} that will be skipped by this extension. This parameter can only be supplied - * if the type is actually a generic type. If this is not the case, beanType is null. + * @param beanType the {@link ParameterizedType} that will be skipped by this extension. This parameter can only be supplied + * if the type is actually a generic type. If this is not the case, beanType is null. * @return true if the Type should be skipped */ boolean skip(Class beanClass, ParameterizedType beanType); @@ -77,13 +72,13 @@ public interface BeanConverterExtension { /** * Conversion logic for the type you defined to process and not to skip. * Converts an original bean to the {@link PersistentBean} which will be sent to the persistence api. - * + *

* It is also possible to convert bean to any other data structure if the underlying persistence api is fully capable of * handling the data structure on its own. * - * @param originalBean the original bean that is supposed to be converted to a serializable data structure, most likely a {@link PersistentBean}. - * @param beanType the {@link ParameterizedType} that will be used for the conversion. This parameter can only be supplied - * if the type is actually a generic type. If this is not the case, beanType is null. + * @param originalBean the original bean that is supposed to be converted to a serializable data structure, most likely a {@link PersistentBean}. + * @param beanType the {@link ParameterizedType} that will be used for the conversion. This parameter can only be supplied + * if the type is actually a generic type. If this is not the case, beanType is null. * @param persistentBeanConverter the current {@link PersistentBeanConverter} that may be used to convert sub objects of bean. * @return the generic data-structure for the bean */ @@ -93,18 +88,18 @@ public interface BeanConverterExtension { * Conversion logic for the generic data-structure to the processed bean type. * Reverts to the original Bean by converting the {@link PersistentBean}, which was deserialized by the underlying * persistence api, to the original object. - * + *

* It is also possible to deserialize other types then {@link PersistentBean} if the underlying persistence api is fully * capable of deserializing this type. I.E. {@link java.util.List}s can be deserialized by Jackson (the default JSON persistence api) * but the elements of the list might be generic {@link PersistentBean}s. The {@link CollectionExtension} would leave it to * Jackson to deserialize the List, but it would iterate over that List to revert the {@link PersistentBean}s inside of that list. * - * @param persistentBean the generic bean - * @param targetClass the {@link Class} of the type that will created from the persistentBean. - * @param targetType the {@link ParameterizedType} fo the type that will be created from persistentBean, This parameter can only be supplied - * if the type is actually a generic type. If this is not the case, beanType is null. + * @param persistentBean the generic bean + * @param targetClass the {@link Class} of the type that will created from the persistentBean. + * @param targetType the {@link ParameterizedType} fo the type that will be created from persistentBean, This parameter can only be supplied + * if the type is actually a generic type. If this is not the case, beanType is null. * @param persistentBeanConverter the current {@link PersistentBeanConverter} that may be used to revert sub objects of persistentBean. - * @param type of the original bean + * @param type of the original bean * @return original bean */ T revert(Object persistentBean, Class targetClass, ParameterizedType targetType, PersistentBeanConverter persistentBeanConverter); diff --git a/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/ext/CollectionExtension.java b/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/ext/CollectionExtension.java index c3a82a0f..18c3b655 100644 --- a/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/ext/CollectionExtension.java +++ b/deepsampler-persistence/src/main/java/de/ppi/deepsampler/persistence/bean/ext/CollectionExtension.java @@ -31,10 +31,10 @@ public boolean isProcessable(Class beanClass, ParameterizedType beanType) { } /** - * We skip the conversion of all Collections, which have primitive (or their wrapper) generic types. Primitve Collections + * We skip the conversion of all Collections, which have primitive (or their wrapper) generic types. Primitive Collections * will then be handled by the concrete persistence api (i.e. Jackson for JSON serialisation). * - * @param beanType the {@link Type} of the bean (Collection is expected here) that is handeld by this {@link BeanConverterExtension} + * @param beanType the {@link Type} of the bean (Collection is expected here) that is handled by this {@link BeanConverterExtension} * @return true if beanType is a primitive {@link Collection} */ @Override diff --git a/deepsampler-persistence/src/test/java/de/ppi/deepsampler/persistence/bean/PersistentBeanConverterTest.java b/deepsampler-persistence/src/test/java/de/ppi/deepsampler/persistence/bean/PersistentBeanConverterTest.java index 00105930..608be34f 100644 --- a/deepsampler-persistence/src/test/java/de/ppi/deepsampler/persistence/bean/PersistentBeanConverterTest.java +++ b/deepsampler-persistence/src/test/java/de/ppi/deepsampler/persistence/bean/PersistentBeanConverterTest.java @@ -107,7 +107,7 @@ void beanInBeanShouldBeReverted() { } @Test - void primitiveBeanShouldBereverted() { + void primitiveBeanShouldBeReverted() { // GIVEN final Map values = new HashMap<>(); values.put("0$simpleInt", 2); diff --git a/deepsampler-persistence/src/test/java/de/ppi/deepsampler/persistence/bean/ReflectionToolsTest.java b/deepsampler-persistence/src/test/java/de/ppi/deepsampler/persistence/bean/ReflectionToolsTest.java index b634c49b..12a3d3bc 100644 --- a/deepsampler-persistence/src/test/java/de/ppi/deepsampler/persistence/bean/ReflectionToolsTest.java +++ b/deepsampler-persistence/src/test/java/de/ppi/deepsampler/persistence/bean/ReflectionToolsTest.java @@ -3,7 +3,6 @@ import de.ppi.deepsampler.persistence.error.PersistenceException; import org.junit.jupiter.api.Test; -import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; diff --git a/deepsampler-persistence/src/test/java/de/ppi/deepsampler/persistence/bean/ext/CollectionExtensionTest.java b/deepsampler-persistence/src/test/java/de/ppi/deepsampler/persistence/bean/ext/CollectionExtensionTest.java index abfc4245..5bdac814 100644 --- a/deepsampler-persistence/src/test/java/de/ppi/deepsampler/persistence/bean/ext/CollectionExtensionTest.java +++ b/deepsampler-persistence/src/test/java/de/ppi/deepsampler/persistence/bean/ext/CollectionExtensionTest.java @@ -158,7 +158,7 @@ void shouldConvertUnmodifiableSetAndReplaceItByHashSet() throws NoSuchMethodExce // WHEN Set result = converter.convert(unmodifiableSet, returnType); - // TEHN + // THEN assertNotNull(result); assertTrue(result instanceof HashSet); assertFalse(unmodifiableSet instanceof HashSet); diff --git a/deepsampler-provider-guice/src/test/java/de/ppi/deepsampler/provider/guice/GuicePersistentSamplerAspectTest.java b/deepsampler-provider-guice/src/test/java/de/ppi/deepsampler/provider/guice/GuicePersistentSamplerAspectTest.java index ef118dcc..3dedd500 100644 --- a/deepsampler-provider-guice/src/test/java/de/ppi/deepsampler/provider/guice/GuicePersistentSamplerAspectTest.java +++ b/deepsampler-provider-guice/src/test/java/de/ppi/deepsampler/provider/guice/GuicePersistentSamplerAspectTest.java @@ -7,8 +7,6 @@ import com.google.inject.Guice; import de.ppi.deepsampler.provider.common.*; -import de.ppi.deepsampler.provider.testservices.DecoupledTestService; - import javax.inject.Inject; diff --git a/deepsampler-provider-spring/src/main/java/de/ppi/deepsampler/provider/spring/SpringSamplerAspect.java b/deepsampler-provider-spring/src/main/java/de/ppi/deepsampler/provider/spring/SpringSamplerAspect.java index 695e034d..39c99165 100644 --- a/deepsampler-provider-spring/src/main/java/de/ppi/deepsampler/provider/spring/SpringSamplerAspect.java +++ b/deepsampler-provider-spring/src/main/java/de/ppi/deepsampler/provider/spring/SpringSamplerAspect.java @@ -66,8 +66,8 @@ public abstract class SpringSamplerAspect { */ @Around("!@within(org.springframework.context.annotation.Configuration) " // excludes all SpringConfigs + "&& !@within(org.aspectj.lang.annotation.Aspect) " // Excludes all Aspects by excluding classes annotated with @Aspect - + "&& !within(is(EnumType)) " // Exludes all Enums - + "&& !within(is(FinalType)) " // Exludes all final classes + + "&& !within(is(EnumType)) " // Excludes all Enums + + "&& !within(is(FinalType)) " // Excludes all final classes + "&& include()") // Delegates to the custom Pointcut that must be defined by overriding the Method SpringSamplerAspect::include @SuppressWarnings("unused") // Method is called generically by Spring, so the compiler believes it would be unused. public Object aroundMethod(final ProceedingJoinPoint joinPoint) throws Throwable { @@ -98,7 +98,7 @@ public Object aroundMethod(final ProceedingJoinPoint joinPoint) throws Throwable /** * Searches for a {@link SampleDefinition} that matches to a particular method call. - * @param proceedingJoinPoint describes the intercepted method. If a {@link SampleDefinition} for this method hs beed defined, this method will be stubbed. + * @param proceedingJoinPoint describes the intercepted method. If a {@link SampleDefinition} for this method has been defined, this method will be stubbed. * @return If the intercepted method (as described by proceedingJoinPoint) has a Sampler the {@link SampleDefinition} will be returned, otherwise null. */ private SampleDefinition findSampleDefinition(final ProceedingJoinPoint proceedingJoinPoint) { diff --git a/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/PersistentSamplerAspectTest.java b/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/PersistentSamplerAspectTest.java index 4745eee9..26fe9d38 100644 --- a/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/PersistentSamplerAspectTest.java +++ b/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/PersistentSamplerAspectTest.java @@ -26,7 +26,6 @@ import static de.ppi.deepsampler.core.api.FixedQuantity.ONCE; import static de.ppi.deepsampler.core.api.Matchers.*; import static de.ppi.deepsampler.persistence.api.PersistentMatchers.combo; -import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.*; import static org.assertj.core.api.Assertions.*; diff --git a/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestBeanWithBytes.java b/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestBeanWithBytes.java index 90b83579..a659d7f4 100644 --- a/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestBeanWithBytes.java +++ b/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestBeanWithBytes.java @@ -6,7 +6,6 @@ package de.ppi.deepsampler.provider.common; import java.util.Arrays; -import java.util.Objects; /** * A very simple Bean that represents non primitive types in TestCases containing a byte[]. diff --git a/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestException.java b/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestException.java index 73ecdf0e..42cfdcac 100644 --- a/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestException.java +++ b/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestException.java @@ -6,7 +6,7 @@ package de.ppi.deepsampler.provider.common; /** - * A simple catched Exception is used for testing purposes only. + * A simple caught Exception is used for testing purposes only. */ public class TestException extends Exception { } diff --git a/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestService.java b/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestService.java index 80d0d460..fb57f48c 100644 --- a/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestService.java +++ b/deepsampler-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestService.java @@ -19,7 +19,7 @@ public class TestService { private int counter = 0; /** - * This method returns a primitve parameter if the method is not sampled. + * This method returns a primitive parameter if the method is not sampled. * This Method is intended to be used in positive and negative tests. * * @param param The parameter that will be returned unchanged