From 5444ea20f76e88683ec4f8299848a3544d99ebcf Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 13 Jan 2017 09:54:49 +0100 Subject: [PATCH] DATAKV-157 - Migrate ticket references in test code to Spring Framework style. --- .../DefaultIdentifierGeneratorUnitTests.java | 25 +- .../ForwardingCloseableIteratorUnitTests.java | 27 +- .../core/IterableConverterUnitTests.java | 27 +- ...rsistenceExceptionTranslatorUnitTests.java | 37 +-- .../keyvalue/core/KeyValueTemplateTests.java | 102 ++----- .../core/KeyValueTemplateUnitTests.java | 257 ++++-------------- .../core/SpelPropertyComperatorUnitTests.java | 57 +--- .../core/SpelQueryEngineUnitTests.java | 12 +- ...otationBasedKeySpaceResolverUnitTests.java | 47 +--- .../SimpleKeyValueRepositoryUnitTests.java | 52 +--- ...CachingKeyValuePartTreeQueryUnitTests.java | 7 +- .../query/KeyValuePartTreeQueryUnitTests.java | 22 +- .../query/SpelQueryCreatorUnitTests.java | 202 +++----------- .../KeyValueQuerydslUtilsUnitTests.java | 32 +-- ...eyValueRepositoryFactoryBeanUnitTests.java | 37 +-- .../data/map/AbstractRepositoryUnitTests.java | 54 +--- .../data/map/MapKeyValueAdapterUnitTests.java | 97 ++----- .../QuerydslKeyValueRepositoryUnitTests.java | 52 +--- ...onfigurationExtensionIntegrationTests.java | 22 +- ...rarWithFullDefaultingIntegrationTests.java | 7 +- ...ithTemplateDefinitionIntegrationTests.java | 7 +- 21 files changed, 246 insertions(+), 936 deletions(-) diff --git a/src/test/java/org/springframework/data/keyvalue/core/DefaultIdentifierGeneratorUnitTests.java b/src/test/java/org/springframework/data/keyvalue/core/DefaultIdentifierGeneratorUnitTests.java index 61b72ce..16af31f 100644 --- a/src/test/java/org/springframework/data/keyvalue/core/DefaultIdentifierGeneratorUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/core/DefaultIdentifierGeneratorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,18 +34,12 @@ public class DefaultIdentifierGeneratorUnitTests { DefaultIdentifierGenerator generator = DefaultIdentifierGenerator.INSTANCE; - /** - * @DATAKV-136 - */ @Test(expected = InvalidDataAccessApiUsageException.class) public void shouldThrowExceptionForUnsupportedType() { generator.generateIdentifierOfType(ClassTypeInformation.from(Date.class)); } - /** - * @DATAKV-136 - */ - @Test + @Test // DATAKV-136 public void shouldGenerateUUIDValueCorrectly() { Object value = generator.generateIdentifierOfType(ClassTypeInformation.from(UUID.class)); @@ -54,10 +48,7 @@ public class DefaultIdentifierGeneratorUnitTests { assertThat(value, instanceOf(UUID.class)); } - /** - * @DATAKV-136 - */ - @Test + @Test // DATAKV-136 public void shouldGenerateStringValueCorrectly() { Object value = generator.generateIdentifierOfType(ClassTypeInformation.from(String.class)); @@ -66,10 +57,7 @@ public class DefaultIdentifierGeneratorUnitTests { assertThat(value, instanceOf(String.class)); } - /** - * @DATAKV-136 - */ - @Test + @Test // DATAKV-136 public void shouldGenerateLongValueCorrectly() { Object value = generator.generateIdentifierOfType(ClassTypeInformation.from(Long.class)); @@ -78,10 +66,7 @@ public class DefaultIdentifierGeneratorUnitTests { assertThat(value, instanceOf(Long.class)); } - /** - * @DATAKV-136 - */ - @Test + @Test // DATAKV-136 public void shouldGenerateIntValueCorrectly() { Object value = generator.generateIdentifierOfType(ClassTypeInformation.from(Integer.class)); diff --git a/src/test/java/org/springframework/data/keyvalue/core/ForwardingCloseableIteratorUnitTests.java b/src/test/java/org/springframework/data/keyvalue/core/ForwardingCloseableIteratorUnitTests.java index c26d8b2..ab5c03f 100644 --- a/src/test/java/org/springframework/data/keyvalue/core/ForwardingCloseableIteratorUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/core/ForwardingCloseableIteratorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,10 +42,7 @@ public class ForwardingCloseableIteratorUnitTests { @Mock Iterator> iteratorMock; @Mock Runnable closeActionMock; - /** - * @see DATAKV-99 - */ - @Test + @Test // DATAKV-99 public void hasNextShoudDelegateToWrappedIterator() { when(iteratorMock.hasNext()).thenReturn(true); @@ -60,10 +57,7 @@ public class ForwardingCloseableIteratorUnitTests { } } - /** - * @see DATAKV-99 - */ - @Test + @Test // DATAKV-99 @SuppressWarnings("unchecked") public void nextShoudDelegateToWrappedIterator() { @@ -79,10 +73,7 @@ public class ForwardingCloseableIteratorUnitTests { } } - /** - * @see DATAKV-99 - */ - @Test(expected = NoSuchElementException.class) + @Test(expected = NoSuchElementException.class) // DATAKV-99 public void nextShoudThrowErrorWhenWrappedIteratorHasNoMoreElements() { when(iteratorMock.next()).thenThrow(new NoSuchElementException()); @@ -96,10 +87,7 @@ public class ForwardingCloseableIteratorUnitTests { } } - /** - * @see DATAKV-99 - */ - @Test + @Test // DATAKV-99 public void closeShouldDoNothingByDefault() { new ForwardingCloseableIterator>(iteratorMock).close(); @@ -107,10 +95,7 @@ public class ForwardingCloseableIteratorUnitTests { verifyZeroInteractions(iteratorMock); } - /** - * @see DATAKV-99 - */ - @Test + @Test // DATAKV-99 public void closeShouldInvokeConfiguredCloseAction() { new ForwardingCloseableIterator>(iteratorMock, closeActionMock).close(); diff --git a/src/test/java/org/springframework/data/keyvalue/core/IterableConverterUnitTests.java b/src/test/java/org/springframework/data/keyvalue/core/IterableConverterUnitTests.java index 382f98b..8e7794d 100644 --- a/src/test/java/org/springframework/data/keyvalue/core/IterableConverterUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/core/IterableConverterUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,26 +37,17 @@ import org.junit.Test; */ public class IterableConverterUnitTests { - /** - * @see DATAKV-101 - */ - @Test + @Test // DATAKV-101 public void toListShouldReturnEmptyListWhenSourceIsNull() { assertThat(toList(null), notNullValue()); } - /** - * @see DATAKV-101 - */ - @Test + @Test // DATAKV-101 public void toListShouldReturnEmptyListWhenSourceEmpty() { assertThat(toList(Collections.emptySet()), empty()); } - /** - * @see DATAKV-101 - */ - @Test + @Test // DATAKV-101 public void toListShouldReturnSameObjectWhenSourceIsAlreadyListType() { List source = new ArrayList(); @@ -64,10 +55,7 @@ public class IterableConverterUnitTests { assertThat(toList(source), sameInstance(source)); } - /** - * @see DATAKV-101 - */ - @Test + @Test // DATAKV-101 public void toListShouldReturnListWhenSourceIsNonListType() { Set source = new HashSet(); @@ -76,10 +64,7 @@ public class IterableConverterUnitTests { assertThat(toList(source), instanceOf(List.class)); } - /** - * @see DATAKV-101 - */ - @Test + @Test // DATAKV-101 public void toListShouldHoldValuesInOrderOfSource() { Set source = new LinkedHashSet(); diff --git a/src/test/java/org/springframework/data/keyvalue/core/KeyValuePersistenceExceptionTranslatorUnitTests.java b/src/test/java/org/springframework/data/keyvalue/core/KeyValuePersistenceExceptionTranslatorUnitTests.java index 5d5d1a4..8a09d95 100644 --- a/src/test/java/org/springframework/data/keyvalue/core/KeyValuePersistenceExceptionTranslatorUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/core/KeyValuePersistenceExceptionTranslatorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,63 +32,42 @@ public class KeyValuePersistenceExceptionTranslatorUnitTests { KeyValuePersistenceExceptionTranslator translator = new KeyValuePersistenceExceptionTranslator(); - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void translateExeptionShouldReturnDataAccessExceptionWhenGivenOne() { assertThat(translator.translateExceptionIfPossible(new DataRetrievalFailureException("booh")), instanceOf(DataRetrievalFailureException.class)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void translateExeptionShouldReturnNullWhenGivenNull() { assertThat(translator.translateExceptionIfPossible(null), nullValue()); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void translateExeptionShouldTranslateNoSuchElementExceptionToDataRetrievalFailureException() { assertThat(translator.translateExceptionIfPossible(new NoSuchElementException("")), instanceOf(DataRetrievalFailureException.class)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void translateExeptionShouldTranslateIndexOutOfBoundsExceptionToDataRetrievalFailureException() { assertThat(translator.translateExceptionIfPossible(new IndexOutOfBoundsException("")), instanceOf(DataRetrievalFailureException.class)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void translateExeptionShouldTranslateIllegalStateExceptionToDataRetrievalFailureException() { assertThat(translator.translateExceptionIfPossible(new IllegalStateException("")), instanceOf(DataRetrievalFailureException.class)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void translateExeptionShouldTranslateAnyJavaExceptionToUncategorizedKeyValueException() { assertThat(translator.translateExceptionIfPossible(new UnsupportedOperationException("")), instanceOf(UncategorizedKeyValueException.class)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void translateExeptionShouldReturnNullForNonJavaExceptions() { assertThat(translator.translateExceptionIfPossible(new NoSuchBeanDefinitionException("")), nullValue()); } diff --git a/src/test/java/org/springframework/data/keyvalue/core/KeyValueTemplateTests.java b/src/test/java/org/springframework/data/keyvalue/core/KeyValueTemplateTests.java index 4c02131..57827f9 100644 --- a/src/test/java/org/springframework/data/keyvalue/core/KeyValueTemplateTests.java +++ b/src/test/java/org/springframework/data/keyvalue/core/KeyValueTemplateTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,54 +67,36 @@ public class KeyValueTemplateTests { this.operations.destroy(); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void insertShouldNotThorwErrorWhenExecutedHavingNonExistingIdAndNonNullValue() { operations.insert("1", FOO_ONE); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void insertShouldThrowExceptionForNullId() { operations.insert(null, FOO_ONE); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void insertShouldThrowExceptionForNullObject() { operations.insert("some-id", null); } - /** - * @see DATACMNS-525 - */ - @Test(expected = DuplicateKeyException.class) + @Test(expected = DuplicateKeyException.class) // DATACMNS-525 public void insertShouldThrowExecptionWhenObjectOfSameTypeAlreadyExists() { operations.insert("1", FOO_ONE); operations.insert("1", FOO_TWO); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void insertShouldWorkCorrectlyWhenObjectsOfDifferentTypesWithSameIdAreInserted() { operations.insert("1", FOO_ONE); operations.insert("1", BAR_ONE); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void createShouldReturnSameInstanceGenerateId() { ClassWithStringId source = new ClassWithStringId(); @@ -123,10 +105,7 @@ public class KeyValueTemplateTests { assertThat(target, sameInstance(source)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void createShouldRespectExistingId() { ClassWithStringId source = new ClassWithStringId(); @@ -137,40 +116,28 @@ public class KeyValueTemplateTests { assertThat(operations.findById("one", ClassWithStringId.class), is(source)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findByIdShouldReturnObjectWithMatchingIdAndType() { operations.insert("1", FOO_ONE); assertThat(operations.findById("1", Foo.class), is(FOO_ONE)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findByIdSouldReturnNullIfNoMatchingIdFound() { operations.insert("1", FOO_ONE); assertThat(operations.findById("2", Foo.class), nullValue()); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findByIdShouldReturnNullIfNoMatchingTypeFound() { operations.insert("1", FOO_ONE); assertThat(operations.findById("1", Bar.class), nullValue()); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findShouldExecuteQueryCorrectly() { operations.insert("1", FOO_ONE); @@ -181,10 +148,7 @@ public class KeyValueTemplateTests { assertThat(result.get(0), is(FOO_TWO)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void readShouldReturnEmptyCollectionIfOffsetOutOfRange() { operations.insert("1", FOO_ONE); @@ -194,10 +158,7 @@ public class KeyValueTemplateTests { assertThat(operations.findInRange(5, 5, Foo.class), emptyIterable()); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void updateShouldReplaceExistingObject() { operations.insert("1", FOO_ONE); @@ -205,10 +166,7 @@ public class KeyValueTemplateTests { assertThat(operations.findById("1", Foo.class), is(FOO_TWO)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void updateShouldRespectTypeInformation() { operations.insert("1", FOO_ONE); @@ -217,10 +175,7 @@ public class KeyValueTemplateTests { assertThat(operations.findById("1", Foo.class), is(FOO_ONE)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void deleteShouldRemoveObjectCorrectly() { operations.insert("1", FOO_ONE); @@ -228,46 +183,31 @@ public class KeyValueTemplateTests { assertThat(operations.findById("1", Foo.class), nullValue()); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void deleteReturnsNullWhenNotExisting() { operations.insert("1", FOO_ONE); assertThat(operations.delete("2", Foo.class), nullValue()); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void deleteReturnsRemovedObject() { operations.insert("1", FOO_ONE); assertThat(operations.delete("1", Foo.class), is(FOO_ONE)); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void deleteThrowsExceptionWhenIdCannotBeExctracted() { operations.delete(FOO_ONE); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void countShouldReturnZeroWhenNoElementsPresent() { assertThat(operations.count(Foo.class), is(0L)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void insertShouldRespectTypeAlias() { operations.insert("1", ALIASED); diff --git a/src/test/java/org/springframework/data/keyvalue/core/KeyValueTemplateUnitTests.java b/src/test/java/org/springframework/data/keyvalue/core/KeyValueTemplateUnitTests.java index 15cec55..bc7939a 100644 --- a/src/test/java/org/springframework/data/keyvalue/core/KeyValueTemplateUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/core/KeyValueTemplateUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -86,26 +86,17 @@ public class KeyValueTemplateUnitTests { this.template.setApplicationEventPublisher(publisherMock); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void shouldThrowExceptionWhenCreatingNewTempateWithNullAdapter() { new KeyValueTemplate(null); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void shouldThrowExceptionWhenCreatingNewTempateWithNullMappingContext() { new KeyValueTemplate(adapterMock, null); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void insertShouldLookUpValuesBeforeInserting() { template.insert("1", FOO_ONE); @@ -113,10 +104,7 @@ public class KeyValueTemplateUnitTests { verify(adapterMock, times(1)).contains("1", Foo.class.getName()); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void insertShouldInsertUseClassNameAsDefaultKeyspace() { template.insert("1", FOO_ONE); @@ -124,10 +112,7 @@ public class KeyValueTemplateUnitTests { verify(adapterMock, times(1)).put("1", FOO_ONE, Foo.class.getName()); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void insertShouldThrowExceptionWhenObectWithIdAlreadyExists() { exception.expect(DuplicateKeyException.class); @@ -138,26 +123,17 @@ public class KeyValueTemplateUnitTests { template.insert("1", FOO_ONE); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void insertShouldThrowExceptionForNullId() { template.insert(null, FOO_ONE); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void insertShouldThrowExceptionForNullObject() { template.insert("some-id", null); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void insertShouldGenerateId() { ClassWithStringId target = template.insert(new ClassWithStringId()); @@ -165,18 +141,12 @@ public class KeyValueTemplateUnitTests { assertThat(target.id, notNullValue()); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void insertShouldThrowErrorWhenIdCannotBeResolved() { template.insert(FOO_ONE); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void insertShouldReturnSameInstanceGenerateId() { ClassWithStringId source = new ClassWithStringId(); @@ -185,10 +155,7 @@ public class KeyValueTemplateUnitTests { assertThat(target, sameInstance(source)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void insertShouldRespectExistingId() { ClassWithStringId source = new ClassWithStringId(); @@ -199,18 +166,12 @@ public class KeyValueTemplateUnitTests { verify(adapterMock, times(1)).put("one", source, ClassWithStringId.class.getName()); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findByIdShouldReturnNullWhenNoElementsPresent() { assertNull(template.findById("1", Foo.class)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findByIdShouldReturnObjectWithMatchingIdAndType() { template.findById("1", Foo.class); @@ -218,18 +179,12 @@ public class KeyValueTemplateUnitTests { verify(adapterMock, times(1)).get("1", Foo.class.getName(), Foo.class); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void findByIdShouldThrowExceptionWhenGivenNullId() { template.findById((Serializable) null, Foo.class); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findAllOfShouldReturnEntireCollection() { template.findAll(Foo.class); @@ -237,18 +192,12 @@ public class KeyValueTemplateUnitTests { verify(adapterMock, times(1)).getAllOf(Foo.class.getName()); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void findAllOfShouldThrowExceptionWhenGivenNullType() { template.findAll(null); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findShouldCallFindOnAdapterToResolveMatching() { template.find(STRING_QUERY, Foo.class); @@ -256,10 +205,7 @@ public class KeyValueTemplateUnitTests { verify(adapterMock, times(1)).find(STRING_QUERY, Foo.class.getName(), Foo.class); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 @SuppressWarnings("rawtypes") public void findInRangeShouldRespectOffset() { @@ -273,10 +219,7 @@ public class KeyValueTemplateUnitTests { assertThat(captor.getValue().getCritieria(), nullValue()); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void updateShouldReplaceExistingObject() { template.update("1", FOO_TWO); @@ -284,26 +227,17 @@ public class KeyValueTemplateUnitTests { verify(adapterMock, times(1)).put("1", FOO_TWO, Foo.class.getName()); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void updateShouldThrowExceptionWhenGivenNullId() { template.update(null, FOO_ONE); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void updateShouldThrowExceptionWhenGivenNullObject() { template.update("1", null); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void updateShouldUseExtractedIdInformation() { ClassWithStringId source = new ClassWithStringId(); @@ -314,18 +248,12 @@ public class KeyValueTemplateUnitTests { verify(adapterMock, times(1)).put(source.id, source, ClassWithStringId.class.getName()); } - /** - * @see DATACMNS-525 - */ - @Test(expected = InvalidDataAccessApiUsageException.class) + @Test(expected = InvalidDataAccessApiUsageException.class) // DATACMNS-525 public void updateShouldThrowErrorWhenIdInformationCannotBeExtracted() { template.update(FOO_ONE); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void deleteShouldRemoveObjectCorrectly() { template.delete("1", Foo.class); @@ -333,10 +261,7 @@ public class KeyValueTemplateUnitTests { verify(adapterMock, times(1)).delete("1", Foo.class.getName(), Foo.class); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void deleteRemovesObjectUsingExtractedId() { ClassWithStringId source = new ClassWithStringId(); @@ -347,26 +272,17 @@ public class KeyValueTemplateUnitTests { verify(adapterMock, times(1)).delete("some-id", ClassWithStringId.class.getName(), ClassWithStringId.class); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void deleteThrowsExceptionWhenIdCannotBeExctracted() { template.delete(FOO_ONE); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void countShouldReturnZeroWhenNoElementsPresent() { template.count(Foo.class); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void countShouldReturnCollectionSize() { when(adapterMock.count(Foo.class.getName())).thenReturn(2L); @@ -374,18 +290,12 @@ public class KeyValueTemplateUnitTests { assertThat(template.count(Foo.class), is(2L)); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void countShouldThrowErrorOnNullType() { template.count(null); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void insertShouldRespectTypeAlias() { template.insert("1", ALIASED); @@ -393,10 +303,7 @@ public class KeyValueTemplateUnitTests { verify(adapterMock, times(1)).put("1", ALIASED, "aliased"); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void insertShouldRespectTypeAliasOnSubClass() { template.insert("1", SUBCLASS_OF_ALIASED); @@ -404,11 +311,8 @@ public class KeyValueTemplateUnitTests { verify(adapterMock, times(1)).put("1", SUBCLASS_OF_ALIASED, "aliased"); } - /** - * @see DATACMNS-525 - */ @SuppressWarnings({ "rawtypes", "unchecked" }) - @Test + @Test // DATACMNS-525 public void findAllOfShouldRespectTypeAliasAndFilterNonMatchingTypes() { Collection foo = Arrays.asList(ALIASED, SUBCLASS_OF_ALIASED); @@ -417,28 +321,19 @@ public class KeyValueTemplateUnitTests { assertThat(template.findAll(SUBCLASS_OF_ALIASED.getClass()), containsInAnyOrder(SUBCLASS_OF_ALIASED)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void insertSouldRespectTypeAliasAndFilterNonMatching() { template.insert("1", ALIASED); assertThat(template.findById("1", SUBCLASS_OF_ALIASED.getClass()), nullValue()); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void setttingNullPersistenceExceptionTranslatorShouldThrowException() { template.setExceptionTranslator(null); } - /** - * @see DATAKV-91 - */ - @Test + @Test // DATAKV-91 public void shouldNotPublishEventWhenNoApplicationContextSet() { template.setApplicationEventPublisher(null); @@ -448,10 +343,7 @@ public class KeyValueTemplateUnitTests { verifyZeroInteractions(publisherMock); } - /** - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-104 public void shouldNotPublishEventsWhenEventsToPublishIsSetToNull() { template.setEventTypesToPublish(null); @@ -461,10 +353,7 @@ public class KeyValueTemplateUnitTests { verifyZeroInteractions(publisherMock); } - /** - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-104 @SuppressWarnings("rawtypes") public void shouldNotPublishEventsWhenEventsToPublishIsSetToEmptyList() { @@ -475,10 +364,7 @@ public class KeyValueTemplateUnitTests { verifyZeroInteractions(publisherMock); } - /** - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-104 public void shouldPublishEventsByDefault() { template.insert("1", FOO_ONE); @@ -486,11 +372,7 @@ public class KeyValueTemplateUnitTests { verify(publisherMock, atLeastOnce()).publishEvent(Matchers.any(KeyValueEvent.class)); } - /** - * @see DATAKV-91 - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-91, DATAKV-104 @SuppressWarnings({ "unchecked", }) public void shouldNotPublishEventWhenNotExplicitlySetForPublication() { @@ -501,11 +383,7 @@ public class KeyValueTemplateUnitTests { verifyZeroInteractions(publisherMock); } - /** - * @see DATAKV-91 - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-91, DATAKV-104 @SuppressWarnings({ "unchecked", "rawtypes" }) public void shouldPublishBeforeInsertEventCorrectly() { @@ -523,11 +401,7 @@ public class KeyValueTemplateUnitTests { assertThat(captor.getValue().getPayload(), is((Object) FOO_ONE)); } - /** - * @see DATAKV-91 - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-91, DATAKV-104 @SuppressWarnings({ "unchecked", "rawtypes" }) public void shouldPublishAfterInsertEventCorrectly() { @@ -545,11 +419,7 @@ public class KeyValueTemplateUnitTests { assertThat(captor.getValue().getPayload(), is((Object) FOO_ONE)); } - /** - * @see DATAKV-91 - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-91, DATAKV-104 @SuppressWarnings({ "unchecked", "rawtypes" }) public void shouldPublishBeforeUpdateEventCorrectly() { @@ -567,11 +437,7 @@ public class KeyValueTemplateUnitTests { assertThat(captor.getValue().getPayload(), is((Object) FOO_ONE)); } - /** - * @see DATAKV-91 - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-91, DATAKV-104 @SuppressWarnings({ "unchecked", "rawtypes" }) public void shouldPublishAfterUpdateEventCorrectly() { @@ -589,11 +455,7 @@ public class KeyValueTemplateUnitTests { assertThat(captor.getValue().getPayload(), is((Object) FOO_ONE)); } - /** - * @see DATAKV-91 - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-91, DATAKV-104 @SuppressWarnings({ "rawtypes", "unchecked" }) public void shouldPublishBeforeDeleteEventCorrectly() { @@ -610,11 +472,7 @@ public class KeyValueTemplateUnitTests { assertThat(captor.getValue().getKeyspace(), is(Foo.class.getName())); } - /** - * @see DATAKV-91 - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-91, DATAKV-104 @SuppressWarnings({ "rawtypes", "unchecked" }) public void shouldPublishAfterDeleteEventCorrectly() { @@ -633,11 +491,7 @@ public class KeyValueTemplateUnitTests { assertThat(captor.getValue().getPayload(), is((Object) FOO_ONE)); } - /** - * @see DATAKV-91 - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-91, DATAKV-104 @SuppressWarnings({ "rawtypes", "unchecked" }) public void shouldPublishBeforeGetEventCorrectly() { @@ -656,11 +510,7 @@ public class KeyValueTemplateUnitTests { assertThat(captor.getValue().getKeyspace(), is(Foo.class.getName())); } - /** - * @see DATAKV-91 - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-91, DATAKV-104 @SuppressWarnings({ "rawtypes", "unchecked" }) public void shouldPublishAfterGetEventCorrectly() { @@ -680,11 +530,7 @@ public class KeyValueTemplateUnitTests { assertThat(captor.getValue().getPayload(), is((Object) FOO_ONE)); } - /** - * @see DATAKV-91 - * @see DATAKV-104 - */ - @Test + @Test // DATAKV-91, DATAKV-104 @SuppressWarnings({ "rawtypes", "unchecked" }) public void shouldPublishDropKeyspaceEventCorrectly() { @@ -700,10 +546,7 @@ public class KeyValueTemplateUnitTests { assertThat(captor.getValue().getKeyspace(), is(Foo.class.getName())); } - /** - * @see DATAKV-129 - */ - @Test + @Test // DATAKV-129 public void insertShouldRespectTypeAliasUsingAliasFor() { template.insert("1", ALIASED_USING_ALIAS_FOR); diff --git a/src/test/java/org/springframework/data/keyvalue/core/SpelPropertyComperatorUnitTests.java b/src/test/java/org/springframework/data/keyvalue/core/SpelPropertyComperatorUnitTests.java index 15d12e7..1784b36 100644 --- a/src/test/java/org/springframework/data/keyvalue/core/SpelPropertyComperatorUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/core/SpelPropertyComperatorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,50 +40,35 @@ public class SpelPropertyComperatorUnitTests { private static final WrapperType WRAPPER_ONE = new WrapperType("w-one", ONE); private static final WrapperType WRAPPER_TWO = new WrapperType("w-two", TWO); - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldCompareStringAscCorrectly() { Comparator comparator = new SpelPropertyComparator("stringProperty", PARSER); assertThat(comparator.compare(ONE, TWO), is(ONE.getStringProperty().compareTo(TWO.getStringProperty()))); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldCompareStringDescCorrectly() { Comparator comparator = new SpelPropertyComparator("stringProperty", PARSER).desc(); assertThat(comparator.compare(ONE, TWO), is(TWO.getStringProperty().compareTo(ONE.getStringProperty()))); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldCompareIntegerAscCorrectly() { Comparator comparator = new SpelPropertyComparator("integerProperty", PARSER); assertThat(comparator.compare(ONE, TWO), is(ONE.getIntegerProperty().compareTo(TWO.getIntegerProperty()))); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldCompareIntegerDescCorrectly() { Comparator comparator = new SpelPropertyComparator("integerProperty", PARSER).desc(); assertThat(comparator.compare(ONE, TWO), is(TWO.getIntegerProperty().compareTo(ONE.getIntegerProperty()))); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldComparePrimitiveIntegerAscCorrectly() { Comparator comparator = new SpelPropertyComparator("primitiveProperty", PARSER); @@ -91,20 +76,14 @@ public class SpelPropertyComperatorUnitTests { is(valueOf(ONE.getPrimitiveProperty()).compareTo(valueOf(TWO.getPrimitiveProperty())))); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldNotFailOnNullValues() { Comparator comparator = new SpelPropertyComparator("stringProperty", PARSER); assertThat(comparator.compare(ONE, new SomeType(null, null, 2)), is(1)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldComparePrimitiveIntegerDescCorrectly() { Comparator comparator = new SpelPropertyComparator("primitiveProperty", PARSER).desc(); @@ -112,29 +91,20 @@ public class SpelPropertyComperatorUnitTests { is(valueOf(TWO.getPrimitiveProperty()).compareTo(valueOf(ONE.getPrimitiveProperty())))); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldSortNullsFirstCorrectly() { Comparator comparator = new SpelPropertyComparator("stringProperty", PARSER).nullsFirst(); assertThat(comparator.compare(ONE, new SomeType(null, null, 2)), equalTo(1)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldSortNullsLastCorrectly() { Comparator comparator = new SpelPropertyComparator("stringProperty", PARSER).nullsLast(); assertThat(comparator.compare(ONE, new SomeType(null, null, 2)), equalTo(-1)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldCompareNestedTypesCorrectly() { Comparator comparator = new SpelPropertyComparator("nestedType.stringProperty", PARSER); @@ -142,10 +112,7 @@ public class SpelPropertyComperatorUnitTests { .compareTo(WRAPPER_TWO.getNestedType().getStringProperty()))); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldCompareNestedTypesCorrectlyWhenOneOfThemHasNullValue() { SpelPropertyComparator comparator = new SpelPropertyComparator( diff --git a/src/test/java/org/springframework/data/keyvalue/core/SpelQueryEngineUnitTests.java b/src/test/java/org/springframework/data/keyvalue/core/SpelQueryEngineUnitTests.java index 98ac8f9..9c0a873 100644 --- a/src/test/java/org/springframework/data/keyvalue/core/SpelQueryEngineUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/core/SpelQueryEngineUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -65,10 +65,7 @@ public class SpelQueryEngineUnitTests { engine.registerAdapter(adapter); } - /** - * @see DATAKV-114 - */ - @Test + @Test // DATAKV-114 @SuppressWarnings("unchecked") public void queriesEntitiesWithNullProperty() throws Exception { @@ -78,10 +75,7 @@ public class SpelQueryEngineUnitTests { -1, anyString()), contains(BOB_WITH_FIRSTNAME)); } - /** - * @see DATAKV-114 - */ - @Test + @Test // DATAKV-114 public void countsEntitiesWithNullProperty() throws Exception { doReturn(people).when(adapter).getAllOf(anyString()); diff --git a/src/test/java/org/springframework/data/keyvalue/core/mapping/AnnotationBasedKeySpaceResolverUnitTests.java b/src/test/java/org/springframework/data/keyvalue/core/mapping/AnnotationBasedKeySpaceResolverUnitTests.java index f0c79ec..100fa23 100644 --- a/src/test/java/org/springframework/data/keyvalue/core/mapping/AnnotationBasedKeySpaceResolverUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/core/mapping/AnnotationBasedKeySpaceResolverUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,74 +47,47 @@ public class AnnotationBasedKeySpaceResolverUnitTests { resolver = AnnotationBasedKeySpaceResolver.INSTANCE; } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldResolveKeySpaceDefaultValueCorrectly() { assertThat(resolver.resolveKeySpace(EntityWithDefaultKeySpace.class), is("daenerys")); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldResolveKeySpaceCorrectly() { assertThat(resolver.resolveKeySpace(EntityWithSetKeySpace.class), is("viserys")); } - /** - * @see DATAKV-105 - */ - @Test + @Test // DATAKV-105 public void shouldReturnNullWhenNoKeySpaceFoundOnComposedPersistentAnnotation() { assertThat(resolver.resolveKeySpace(TypeWithInhteritedPersistentAnnotationNotHavingKeySpace.class), nullValue()); } - /** - * @see DATAKV-105 - */ - @Test + @Test // DATAKV-105 public void shouldReturnNullWhenPersistentIsFoundOnNonComposedAnnotation() { assertThat(resolver.resolveKeySpace(TypeWithPersistentAnnotationNotHavingKeySpace.class), nullValue()); } - /** - * @see DATAKV-105 - */ - @Test + @Test // DATAKV-105 public void shouldReturnNullWhenPersistentIsNotFound() { assertThat(resolver.resolveKeySpace(TypeWithoutKeySpace.class), nullValue()); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldResolveInheritedKeySpaceCorrectly() { assertThat(resolver.resolveKeySpace(EntityWithInheritedKeySpace.class), is("viserys")); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldResolveDirectKeySpaceAnnotationCorrectly() { assertThat(resolver.resolveKeySpace(TypeWithDirectKeySpaceAnnotation.class), is("rhaegar")); } - /** - * @see DATAKV-129 - */ - @Test + @Test // DATAKV-129 public void shouldResolveKeySpaceUsingAliasForCorrectly() { assertThat(resolver.resolveKeySpace(EntityWithSetKeySpaceUsingAliasFor.class), is("viserys")); } - /** - * @see DATAKV-129 - */ - @Test + @Test // DATAKV-129 public void shouldResolveKeySpaceUsingAliasForCorrectlyOnSubClass() { assertThat(resolver.resolveKeySpace(EntityWithInheritedKeySpaceUsingAliasFor.class), is("viserys")); } diff --git a/src/test/java/org/springframework/data/keyvalue/repository/SimpleKeyValueRepositoryUnitTests.java b/src/test/java/org/springframework/data/keyvalue/repository/SimpleKeyValueRepositoryUnitTests.java index 0c6935b..6e5ea4f 100644 --- a/src/test/java/org/springframework/data/keyvalue/repository/SimpleKeyValueRepositoryUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/repository/SimpleKeyValueRepositoryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,10 +50,7 @@ public class SimpleKeyValueRepositoryUnitTests { repo = new SimpleKeyValueRepository(ei, opsMock); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void saveNewWithNumericId() { ReflectionEntityInformation ei = new ReflectionEntityInformation( @@ -67,10 +64,7 @@ public class SimpleKeyValueRepositoryUnitTests { verify(opsMock, times(1)).insert(eq(withNumericId)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void testDoubleSave() { Foo foo = new Foo("one"); @@ -83,10 +77,7 @@ public class SimpleKeyValueRepositoryUnitTests { verify(opsMock, times(1)).update(eq(foo.getId()), eq(foo)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void multipleSave() { Foo one = new Foo("one"); @@ -97,10 +88,7 @@ public class SimpleKeyValueRepositoryUnitTests { verify(opsMock, times(1)).insert(eq(two)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void deleteEntity() { Foo one = repo.save(new Foo("one")); @@ -109,10 +97,7 @@ public class SimpleKeyValueRepositoryUnitTests { verify(opsMock, times(1)).delete(eq(one.getId()), eq(Foo.class)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void deleteById() { repo.delete("one"); @@ -120,10 +105,7 @@ public class SimpleKeyValueRepositoryUnitTests { verify(opsMock, times(1)).delete(eq("one"), eq(Foo.class)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void deleteAll() { repo.deleteAll(); @@ -131,10 +113,7 @@ public class SimpleKeyValueRepositoryUnitTests { verify(opsMock, times(1)).delete(eq(Foo.class)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findAllIds() { repo.findAll(Arrays.asList("one", "two", "three")); @@ -142,10 +121,7 @@ public class SimpleKeyValueRepositoryUnitTests { verify(opsMock, times(3)).findById(anyString(), eq(Foo.class)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findAllWithPageableShouldDelegateToOperationsCorrectlyWhenPageableDoesNotContainSort() { repo.findAll(new PageRequest(10, 15)); @@ -153,10 +129,7 @@ public class SimpleKeyValueRepositoryUnitTests { verify(opsMock, times(1)).findInRange(eq(150), eq(15), isNull(Sort.class), eq(Foo.class)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findAllWithPageableShouldDelegateToOperationsCorrectlyWhenPageableContainsSort() { Sort sort = new Sort("for", "bar"); @@ -165,10 +138,7 @@ public class SimpleKeyValueRepositoryUnitTests { verify(opsMock, times(1)).findInRange(eq(150), eq(15), eq(sort), eq(Foo.class)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findAllShouldFallbackToFindAllOfWhenGivenNullPageable() { repo.findAll((Pageable) null); diff --git a/src/test/java/org/springframework/data/keyvalue/repository/query/CachingKeyValuePartTreeQueryUnitTests.java b/src/test/java/org/springframework/data/keyvalue/repository/query/CachingKeyValuePartTreeQueryUnitTests.java index 23788c5..825f781 100644 --- a/src/test/java/org/springframework/data/keyvalue/repository/query/CachingKeyValuePartTreeQueryUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/repository/query/CachingKeyValuePartTreeQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,10 +57,7 @@ public class CachingKeyValuePartTreeQueryUnitTests { when(metadataMock.getReturnedDomainClass(any(Method.class))).thenReturn((Class) Person.class); } - /** - * @see DATAKV-137 - */ - @Test + @Test // DATAKV-137 public void cachedSpelExpressionShouldBeReusedWithNewContext() throws NoSuchMethodException, SecurityException { QueryMethod qm = new QueryMethod(Repo.class.getMethod("findByFirstname", String.class), metadataMock, diff --git a/src/test/java/org/springframework/data/keyvalue/repository/query/KeyValuePartTreeQueryUnitTests.java b/src/test/java/org/springframework/data/keyvalue/repository/query/KeyValuePartTreeQueryUnitTests.java index 453626f..4c6c258 100644 --- a/src/test/java/org/springframework/data/keyvalue/repository/query/KeyValuePartTreeQueryUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/repository/query/KeyValuePartTreeQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,10 +52,7 @@ public class KeyValuePartTreeQueryUnitTests { @Mock RepositoryMetadata metadataMock; @Mock ProjectionFactory projectionFactoryMock; - /** - * @see DATAKV-115 - */ - @Test + @Test // DATAKV-115 @SuppressWarnings({ "unchecked", "rawtypes" }) public void spelExpressionAndContextShouldNotBeReused() throws NoSuchMethodException, SecurityException { @@ -76,10 +73,7 @@ public class KeyValuePartTreeQueryUnitTests { assertThat(first, not(sameInstance(second))); } - /** - * @see DATAKV-142 - */ - @Test + @Test // DATAKV-142 @SuppressWarnings({ "unchecked", "rawtypes" }) public void shouldApplyPageableParameterToCollectionQuery() throws SecurityException, NoSuchMethodException { @@ -98,10 +92,7 @@ public class KeyValuePartTreeQueryUnitTests { assertThat(query.getRows(), is(3)); } - /** - * @see DATAKV-142 - */ - @Test + @Test // DATAKV-142 @SuppressWarnings({ "unchecked", "rawtypes" }) public void shouldApplyDerivedMaxResultsToQuery() throws SecurityException, NoSuchMethodException { @@ -118,10 +109,7 @@ public class KeyValuePartTreeQueryUnitTests { assertThat(query.getRows(), is(3)); } - /** - * @see DATAKV-142 - */ - @Test + @Test // DATAKV-142 @SuppressWarnings({ "unchecked", "rawtypes" }) public void shouldApplyDerivedMaxResultsToQueryWithParameters() throws SecurityException, NoSuchMethodException { diff --git a/src/test/java/org/springframework/data/keyvalue/repository/query/SpelQueryCreatorUnitTests.java b/src/test/java/org/springframework/data/keyvalue/repository/query/SpelQueryCreatorUnitTests.java index e4a4b38..325bbd9 100644 --- a/src/test/java/org/springframework/data/keyvalue/repository/query/SpelQueryCreatorUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/repository/query/SpelQueryCreatorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,322 +60,202 @@ public class SpelQueryCreatorUnitTests { @Mock RepositoryMetadata metadataMock; - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void equalsReturnsTrueWhenMatching() throws Exception { assertThat(evaluate("findByFirstname", BRAN.firstname).against(BRAN), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void equalsReturnsFalseWhenNotMatching() throws Exception { assertThat(evaluate("findByFirstname", BRAN.firstname).against(RICKON), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void isTrueAssertedPropertlyWhenTrue() throws Exception { assertThat(evaluate("findBySkinChangerIsTrue").against(BRAN), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void isTrueAssertedPropertlyWhenFalse() throws Exception { assertThat(evaluate("findBySkinChangerIsTrue").against(RICKON), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void isFalseAssertedPropertlyWhenTrue() throws Exception { assertThat(evaluate("findBySkinChangerIsFalse").against(BRAN), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void isFalseAssertedPropertlyWhenFalse() throws Exception { assertThat(evaluate("findBySkinChangerIsFalse").against(RICKON), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void isNullAssertedPropertlyWhenAttributeIsNull() throws Exception { assertThat(evaluate("findByLastnameIsNull").against(BRAN), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void isNullAssertedPropertlyWhenAttributeIsNotNull() throws Exception { assertThat(evaluate("findByLastnameIsNull").against(ROBB), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void isNotNullFalseTrueWhenAttributeIsNull() throws Exception { assertThat(evaluate("findByLastnameIsNotNull").against(BRAN), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void isNotNullReturnsTrueAttributeIsNotNull() throws Exception { assertThat(evaluate("findByLastnameIsNotNull").against(ROBB), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void startsWithReturnsTrueWhenMatching() throws Exception { assertThat(evaluate("findByFirstnameStartingWith", "r").against(ROBB), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void startsWithReturnsFalseWhenNotMatching() throws Exception { assertThat(evaluate("findByFirstnameStartingWith", "r").against(BRAN), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void likeReturnsTrueWhenMatching() throws Exception { assertThat(evaluate("findByFirstnameLike", "ob").against(ROBB), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void likeReturnsFalseWhenNotMatching() throws Exception { assertThat(evaluate("findByFirstnameLike", "ra").against(ROBB), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void endsWithReturnsTrueWhenMatching() throws Exception { assertThat(evaluate("findByFirstnameEndingWith", "bb").against(ROBB), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void endsWithReturnsFalseWhenNotMatching() throws Exception { assertThat(evaluate("findByFirstnameEndingWith", "an").against(ROBB), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test(expected = InvalidDataAccessApiUsageException.class) + @Test(expected = InvalidDataAccessApiUsageException.class) // DATACMNS-525 public void startsWithIgnoreCaseReturnsTrueWhenMatching() throws Exception { assertThat(evaluate("findByFirstnameIgnoreCase", "R").against(ROBB), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void greaterThanReturnsTrueForHigherValues() throws Exception { assertThat(evaluate("findByAgeGreaterThan", BRAN.age).against(ROBB), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void greaterThanReturnsFalseForLowerValues() throws Exception { assertThat(evaluate("findByAgeGreaterThan", BRAN.age).against(RICKON), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void afterReturnsTrueForHigherValues() throws Exception { assertThat(evaluate("findByBirthdayAfter", ROBB.birthday).against(BRAN), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void afterReturnsFalseForLowerValues() throws Exception { assertThat(evaluate("findByBirthdayAfter", BRAN.birthday).against(ROBB), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void greaterThanEaualsReturnsTrueForHigherValues() throws Exception { assertThat(evaluate("findByAgeGreaterThanEqual", BRAN.age).against(ROBB), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void greaterThanEqualsReturnsTrueForEqualValues() throws Exception { assertThat(evaluate("findByAgeGreaterThanEqual", BRAN.age).against(BRAN), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void greaterThanEqualsReturnsFalseForLowerValues() throws Exception { assertThat(evaluate("findByAgeGreaterThanEqual", BRAN.age).against(RICKON), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void lessThanReturnsTrueForHigherValues() throws Exception { assertThat(evaluate("findByAgeLessThan", BRAN.age).against(ROBB), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void lessThanReturnsFalseForLowerValues() throws Exception { assertThat(evaluate("findByAgeLessThan", BRAN.age).against(RICKON), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void beforeReturnsTrueForLowerValues() throws Exception { assertThat(evaluate("findByBirthdayBefore", BRAN.birthday).against(ROBB), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void beforeReturnsFalseForHigherValues() throws Exception { assertThat(evaluate("findByBirthdayBefore", ROBB.birthday).against(BRAN), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void lessThanEaualsReturnsTrueForHigherValues() throws Exception { assertThat(evaluate("findByAgeLessThanEqual", BRAN.age).against(ROBB), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void lessThanEaualsReturnsTrueForEqualValues() throws Exception { assertThat(evaluate("findByAgeLessThanEqual", BRAN.age).against(BRAN), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void lessThanEqualsReturnsFalseForLowerValues() throws Exception { assertThat(evaluate("findByAgeLessThanEqual", BRAN.age).against(RICKON), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void betweenEqualsReturnsTrueForValuesInBetween() throws Exception { assertThat(evaluate("findByAgeBetween", BRAN.age, ROBB.age).against(ARYA), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void betweenEqualsReturnsFalseForHigherValues() throws Exception { assertThat(evaluate("findByAgeBetween", BRAN.age, ROBB.age).against(JON), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void betweenEqualsReturnsFalseForLowerValues() throws Exception { assertThat(evaluate("findByAgeBetween", BRAN.age, ROBB.age).against(RICKON), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void connectByAndReturnsTrueWhenAllPropertiesMatching() throws Exception { assertThat(evaluate("findByAgeGreaterThanAndLastname", BRAN.age, JON.lastname).against(JON), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void connectByAndReturnsFalseWhenOnlyFewPropertiesMatch() throws Exception { assertThat(evaluate("findByAgeGreaterThanAndLastname", BRAN.age, JON.lastname).against(ROBB), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void connectByOrReturnsTrueWhenOnlyFewPropertiesMatch() throws Exception { assertThat(evaluate("findByAgeGreaterThanOrLastname", BRAN.age, JON.lastname).against(ROBB), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void connectByOrReturnsTrueWhenAllPropertiesMatch() throws Exception { assertThat(evaluate("findByAgeGreaterThanOrLastname", BRAN.age, JON.lastname).against(JON), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void regexReturnsTrueWhenMatching() throws Exception { assertThat(evaluate("findByLastnameMatches", "^s.*w$").against(JON), is(true)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void regexReturnsFalseWhenNotMatching() throws Exception { assertThat(evaluate("findByLastnameMatches", "^s.*w$").against(ROBB), is(false)); } diff --git a/src/test/java/org/springframework/data/keyvalue/repository/support/KeyValueQuerydslUtilsUnitTests.java b/src/test/java/org/springframework/data/keyvalue/repository/support/KeyValueQuerydslUtilsUnitTests.java index 7249e63..ba117d6 100644 --- a/src/test/java/org/springframework/data/keyvalue/repository/support/KeyValueQuerydslUtilsUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/repository/support/KeyValueQuerydslUtilsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,26 +52,17 @@ public class KeyValueQuerydslUtilsUnitTests { this.builder = new PathBuilder(path.getType(), path.getMetadata()); } - /** - * @see DATACMNS-525 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACMNS-525 public void toOrderSpecifierThrowsExceptioOnNullPathBuilder() { toOrderSpecifier(new Sort("firstname"), null); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void toOrderSpecifierReturnsEmptyArrayWhenSortIsNull() { assertThat(toOrderSpecifier(null, builder), arrayWithSize(0)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void toOrderSpecifierConvertsSimpleAscSortCorrectly() { Sort sort = new Sort(Direction.ASC, "firstname"); @@ -82,10 +73,7 @@ public class KeyValueQuerydslUtilsUnitTests { IsArrayContainingInOrder.> arrayContaining(QPerson.person.firstname.asc())); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void toOrderSpecifierConvertsSimpleDescSortCorrectly() { Sort sort = new Sort(Direction.DESC, "firstname"); @@ -96,10 +84,7 @@ public class KeyValueQuerydslUtilsUnitTests { IsArrayContainingInOrder.> arrayContaining(QPerson.person.firstname.desc())); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void toOrderSpecifierConvertsSortCorrectlyAndRetainsArgumentOrder() { Sort sort = new Sort(Direction.DESC, "firstname").and(new Sort(Direction.ASC, "age")); @@ -110,10 +95,7 @@ public class KeyValueQuerydslUtilsUnitTests { QPerson.person.age.asc())); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void toOrderSpecifierConvertsSortWithNullHandlingCorrectly() { Sort sort = new Sort(new Sort.Order(Direction.DESC, "firstname", NullHandling.NULLS_LAST)); diff --git a/src/test/java/org/springframework/data/keyvalue/repository/support/KeyValueRepositoryFactoryBeanUnitTests.java b/src/test/java/org/springframework/data/keyvalue/repository/support/KeyValueRepositoryFactoryBeanUnitTests.java index 82b6697..c1051ad 100644 --- a/src/test/java/org/springframework/data/keyvalue/repository/support/KeyValueRepositoryFactoryBeanUnitTests.java +++ b/src/test/java/org/springframework/data/keyvalue/repository/support/KeyValueRepositoryFactoryBeanUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,35 +48,23 @@ public class KeyValueRepositoryFactoryBeanUnitTests { SampleRepository.class); } - /** - * @see DATAKV-123 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATAKV-123 public void rejectsNullKeyValueOperations() { factoryBean.setKeyValueOperations(null); } - /** - * @see DATAKV-123 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATAKV-123 public void rejectsNullQueryCreator() { factoryBean.setQueryCreator(null); } - /** - * @see DATAKV-123 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATAKV-123 public void rejectsUninitializedInstance() { factoryBean.afterPropertiesSet(); } - /** - * @see DATAKV-123 - */ @SuppressWarnings("unchecked") - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATAKV-123 public void rejectsInstanceWithoutKeyValueOperations() { Class> creatorType = (Class>) mock( @@ -86,20 +74,14 @@ public class KeyValueRepositoryFactoryBeanUnitTests { factoryBean.afterPropertiesSet(); } - /** - * @see DATAKV-123 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATAKV-123 public void rejectsInstanceWithoutQueryCreator() { factoryBean.setKeyValueOperations(mock(KeyValueOperations.class)); factoryBean.afterPropertiesSet(); } - /** - * @see DATAKV-123 - */ - @Test + @Test // DATAKV-123 @SuppressWarnings("unchecked") public void createsRepositoryFactory() { @@ -115,10 +97,7 @@ public class KeyValueRepositoryFactoryBeanUnitTests { assertThat(factoryBean.createRepositoryFactory(), is(notNullValue())); } - /** - * @see DATAKV-112 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATAKV-112 public void rejectsNullQueryType() { factoryBean.setQueryType(null); } diff --git a/src/test/java/org/springframework/data/map/AbstractRepositoryUnitTests.java b/src/test/java/org/springframework/data/map/AbstractRepositoryUnitTests.java index 1d342e2..1d88dcb 100644 --- a/src/test/java/org/springframework/data/map/AbstractRepositoryUnitTests.java +++ b/src/test/java/org/springframework/data/map/AbstractRepositoryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,10 +67,7 @@ public abstract class AbstractRepositoryUnitTests { - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findOneIsExecutedCorrectly() { repository.save(LENNISTERS); @@ -56,10 +53,7 @@ public class QuerydslKeyValueRepositoryUnitTests extends AbstractRepositoryUnitT assertThat(result, is(CERSEI)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findAllIsExecutedCorrectly() { repository.save(LENNISTERS); @@ -68,10 +62,7 @@ public class QuerydslKeyValueRepositoryUnitTests extends AbstractRepositoryUnitT assertThat(result, containsInAnyOrder(CERSEI, JAIME)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findWithPaginationWorksCorrectly() { repository.save(LENNISTERS); @@ -89,10 +80,7 @@ public class QuerydslKeyValueRepositoryUnitTests extends AbstractRepositoryUnitT assertThat(page2.hasNext(), is(false)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findAllUsingOrderSpecifierWorksCorrectly() { repository.save(LENNISTERS); @@ -103,10 +91,7 @@ public class QuerydslKeyValueRepositoryUnitTests extends AbstractRepositoryUnitT assertThat(result, contains(JAIME, CERSEI)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findAllUsingPageableWithSortWorksCorrectly() { repository.save(LENNISTERS); @@ -117,10 +102,7 @@ public class QuerydslKeyValueRepositoryUnitTests extends AbstractRepositoryUnitT assertThat(result, contains(JAIME, CERSEI)); } - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void findAllUsingPagableWithQSortWorksCorrectly() { repository.save(LENNISTERS); @@ -131,10 +113,7 @@ public class QuerydslKeyValueRepositoryUnitTests extends AbstractRepositoryUnitT assertThat(result, contains(JAIME, CERSEI)); } - /** - * @see DATAKV-90 - */ - @Test + @Test // DATAKV-90 public void findAllWithOrderSpecifierWorksCorrectly() { repository.save(LENNISTERS); @@ -144,10 +123,7 @@ public class QuerydslKeyValueRepositoryUnitTests extends AbstractRepositoryUnitT assertThat(result, contains(TYRION, JAIME, CERSEI)); } - /** - * @see DATAKV-90 - */ - @Test + @Test // DATAKV-90 public void findAllShouldIgnoreNullOrderSpecifier() { repository.save(LENNISTERS); @@ -157,10 +133,7 @@ public class QuerydslKeyValueRepositoryUnitTests extends AbstractRepositoryUnitT assertThat(result, containsInAnyOrder(TYRION, JAIME, CERSEI)); } - /** - * @see DATAKV-95 - */ - @Test + @Test // DATAKV-95 public void executesExistsCorrectly() { repository.save(LENNISTERS); @@ -168,10 +141,7 @@ public class QuerydslKeyValueRepositoryUnitTests extends AbstractRepositoryUnitT assertThat(repository.exists(QPerson.person.age.eq(CERSEI.getAge())), is(true)); } - /** - * @see DATAKV-96 - */ - @Test + @Test // DATAKV-96 public void shouldSupportFindAllWithPredicateAndSort() { repository.save(LENNISTERS); diff --git a/src/test/java/org/springframework/data/map/repository/config/MapRepositoriesConfigurationExtensionIntegrationTests.java b/src/test/java/org/springframework/data/map/repository/config/MapRepositoriesConfigurationExtensionIntegrationTests.java index f479449..7990261 100644 --- a/src/test/java/org/springframework/data/map/repository/config/MapRepositoriesConfigurationExtensionIntegrationTests.java +++ b/src/test/java/org/springframework/data/map/repository/config/MapRepositoriesConfigurationExtensionIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,10 +40,7 @@ import org.springframework.test.util.ReflectionTestUtils; */ public class MapRepositoriesConfigurationExtensionIntegrationTests { - /** - * @see DATAKV-86 - */ - @Test + @Test // DATAKV-86 public void registersDefaultTemplateIfReferenceNotCustomized() { ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(Config.class); @@ -53,10 +50,7 @@ public class MapRepositoriesConfigurationExtensionIntegrationTests { context.close(); } - /** - * @see DATAKV-86 - */ - @Test + @Test // DATAKV-86 public void doesNotRegisterDefaulttemplateIfReferenceIsCustomized() { ConfigurableApplicationContext context = new AnnotationConfigApplicationContext( @@ -67,19 +61,13 @@ public class MapRepositoriesConfigurationExtensionIntegrationTests { context.close(); } - /** - * @see DATAKV-87 - */ - @Test + @Test // DATAKV-87 public void considersMapTypeConfiguredOnAnnotation() { assertKeyValueTemplateWithAdapterFor(ConcurrentSkipListMap.class, new AnnotationConfigApplicationContext( ConfigWithCustomizedMapType.class)); } - /** - * @see DATAKV-87 - */ - @Test + @Test // DATAKV-87 public void doesNotConsiderMapConfiguredIfTemplateIsPresent() { assertKeyValueTemplateWithAdapterFor(ConcurrentHashMap.class, new AnnotationConfigApplicationContext( ConfigWithCustomizedMapTypeAndExplicitDefinitionOfKeyValueTemplate.class)); diff --git a/src/test/java/org/springframework/data/map/repository/config/MapRepositoryRegistrarWithFullDefaultingIntegrationTests.java b/src/test/java/org/springframework/data/map/repository/config/MapRepositoryRegistrarWithFullDefaultingIntegrationTests.java index f205e02..301f1cd 100644 --- a/src/test/java/org/springframework/data/map/repository/config/MapRepositoryRegistrarWithFullDefaultingIntegrationTests.java +++ b/src/test/java/org/springframework/data/map/repository/config/MapRepositoryRegistrarWithFullDefaultingIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,10 +46,7 @@ public class MapRepositoryRegistrarWithFullDefaultingIntegrationTests { @Autowired PersonRepository repo; - /** - * @see DATAKV-86 - */ - @Test + @Test // DATAKV-86 public void shouldEnableMapRepositoryCorrectly() { assertThat(repo, notNullValue()); } diff --git a/src/test/java/org/springframework/data/map/repository/config/MapRepositoryRegistrarWithTemplateDefinitionIntegrationTests.java b/src/test/java/org/springframework/data/map/repository/config/MapRepositoryRegistrarWithTemplateDefinitionIntegrationTests.java index 9a9e524..a631e43 100644 --- a/src/test/java/org/springframework/data/map/repository/config/MapRepositoryRegistrarWithTemplateDefinitionIntegrationTests.java +++ b/src/test/java/org/springframework/data/map/repository/config/MapRepositoryRegistrarWithTemplateDefinitionIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,10 +54,7 @@ public class MapRepositoryRegistrarWithTemplateDefinitionIntegrationTests { @Autowired PersonRepository repo; - /** - * @see DATACMNS-525 - */ - @Test + @Test // DATACMNS-525 public void shouldEnableMapRepositoryCorrectly() { assertThat(repo, notNullValue()); }