From b247181a34a710da10ad12f289350ce418627862 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 11 Jan 2017 11:47:57 +0100 Subject: [PATCH] DATACASS-385 - Migrate ticket references in test code to Spring Framework style. --- ...ssandraCqlClusterFactoryBeanUnitTests.java | 137 ++------ ...ssandraCqlSessionFactoryBeanUnitTests.java | 96 +++--- .../PoolingOptionsFactoryBeanUnitTests.java | 52 +-- ...AbstractClusterConfigurationUnitTests.java | 83 +---- .../CassandraCqlClusterParserUnitTests.java | 52 +-- .../config/xml/ParsingUtilsUnitTests.java | 52 +-- .../AsyncCqlTemplateIntegrationTests.java | 67 +--- .../core/AsyncCqlTemplateUnitTests.java | 222 +++---------- ...chedPreparedStatementCreatorUnitTests.java | 33 +- .../ConsistencyLevelResolverUnitTests.java | 8 +- .../core/CqlTemplateIntegrationTests.java | 67 +--- .../cassandra/core/CqlTemplateUnitTests.java | 223 +++---------- ...ridgedReactiveSessionIntegrationTests.java | 28 +- ...efaultBridgedReactiveSessionUnitTests.java | 51 +-- .../cassandra/core/QueryOptionsUnitTests.java | 47 +-- .../core/QueryOptionsUtilUnitTests.java | 42 +-- .../ReactiveCqlTemplateIntegrationTests.java | 51 +-- .../core/ReactiveCqlTemplateUnitTests.java | 268 ++++----------- .../core/SingleColumnRowMapperUnitTests.java | 47 +-- .../cassandra/core/WriteOptionsUnitTests.java | 32 +- .../core/cql/CqlIdentifierUnitTests.java | 2 +- ...bstractIndexOperationCqlGeneratorTest.java | 2 +- ...ractKeyspaceOperationCqlGeneratorTest.java | 2 +- ...bstractTableOperationCqlGeneratorTest.java | 2 +- .../AlterKeyspaceCqlGeneratorUnitTests.java | 2 +- ...lterTableCqlGeneratorIntegrationTests.java | 38 +-- .../AlterTableCqlGeneratorUnitTests.java | 47 +-- ...rUserTypeCqlGeneratorIntegrationTests.java | 32 +- .../AlterUserTypeCqlGeneratorUnitTests.java | 32 +- .../CreateIndexCqlGeneratorUnitTests.java | 2 +- .../CreateKeyspaceCqlGeneratorUnitTests.java | 2 +- .../CreateTableCqlGeneratorUnitTests.java | 2 +- ...eUserTypeCqlGeneratorIntegrationTests.java | 19 +- .../CreateUserTypeCqlGeneratorUnitTests.java | 27 +- .../DropIndexCqlGeneratorUnitTests.java | 2 +- .../DropKeyspaceCqlGeneratorUnitTests.java | 2 +- .../DropTableCqlGeneratorUnitTests.java | 2 +- .../DropUserTypeCqlGeneratorUnitTests.java | 14 +- .../core/keyspace/OptionUnitTests.java | 2 +- .../core/support/EmptyResultSetUnitTests.java | 2 +- .../core/util/CollectionUtilsUnitTests.java | 2 +- .../support/BeanDefinitionTestUtils.java | 2 +- .../support/CassandraAccessorUnitTests.java | 37 +-- ...CassandraExceptionTranslatorUnitTests.java | 10 +- .../cassandra/support/RandomKeySpaceName.java | 2 +- ...tractEmbeddedCassandraIntegrationTest.java | 2 +- ...stractKeyspaceCreatingIntegrationTest.java | 2 +- .../test/integration/CassandraRule.java | 2 +- .../EmbeddedCassandraServerHelper.java | 2 +- .../test/integration/KeyspaceRule.java | 2 +- ...CqlClusterFactoryBeanIntegrationTests.java | 2 +- .../config/IntegrationTestUtils.java | 2 +- .../config/java/AbstractIntegrationTest.java | 2 +- .../test/integration/config/java/Config.java | 2 +- .../config/java/ConfigIntegrationTests.java | 2 +- .../CqlTemplateConfigIntegrationTests.java | 2 +- .../java/KeyspaceCreatingJavaConfig.java | 2 +- ...aceCreatingJavaConfigIntegrationTests.java | 2 +- ...paceCreatingXmlConfigIntegrationTests.java | 2 +- ...paceCreatingXmlConfigIntegrationTests.java | 2 +- .../xml/MinimalXmlConfigIntegrationTests.java | 2 +- ...paceCreatingXmlConfigIntegrationTests.java | 12 +- .../config/xml/TestHostStateListener.java | 2 +- .../config/xml/TestLatencyTracker.java | 2 +- .../config/xml/XmlConfigIntegrationTests.java | 12 +- .../cassandra/test/integration/core/Book.java | 2 +- .../test/integration/core/BookListener.java | 2 +- .../CqlIndexSpecificationAssertions.java | 2 +- .../CqlKeyspaceSpecificationAssertions.java | 2 +- .../CqlTableSpecificationAssertions.java | 2 +- ...eateIndexCqlGeneratorIntegrationTests.java | 2 +- ...eKeyspaceCqlGeneratorIntegrationTests.java | 2 +- ...eateTableCqlGeneratorIntegrationTests.java | 2 +- ...LifecycleCqlGeneratorIntegrationTests.java | 2 +- .../TableLifecycleIntegrationTests.java | 2 +- .../TableOptionsIntegrationTests.java | 2 +- .../support/AbstractTestJavaConfig.java | 2 +- .../CallbackSynchronizationSupport.java | 2 +- .../CassandraConnectionProperties.java | 2 +- .../test/integration/support/CqlDataSet.java | 6 +- .../support/FastShutdownNettyOptions.java | 6 +- .../data/cassandra/RowMockUtil.java | 2 +- .../CassandraSessionFactoryBeanUnitTests.java | 42 +-- .../config/SchemaActionIntegrationTests.java | 3 +- .../CassandraNamespaceIntegrationTests.java | 25 +- .../convert/ColumnReaderUnitTests.java | 2 +- .../ConverterRegistrationUnitTests.java | 17 +- .../convert/CustomConversionsUnitTests.java | 87 ++--- ...CassandraConverterUDTIntegrationTests.java | 107 ++---- .../MappingCassandraConverterUnitTests.java | 306 ++++-------------- ...syncCassandraTemplateIntegrationTests.java | 27 +- .../core/AsyncCassandraTemplateUnitTests.java | 98 ++---- ...assandraAdminTemplateIntegrationTests.java | 8 +- ...assandraBatchTemplateIntegrationTests.java | 52 +-- ...ersistentEntitySchemaCreatorUnitTests.java | 5 +- ...ersistentEntitySchemaDropperUnitTests.java | 19 +- .../CassandraTemplateIntegrationTests.java | 47 +-- .../core/CassandraTemplateUnitTests.java | 101 ++---- ...tiveCassandraTemplateIntegrationTests.java | 33 +- .../ReactiveCassandraTemplateUnitTests.java | 89 ++--- .../cassandra/domain/AllPossibleTypes.java | 12 +- .../data/cassandra/domain/CompositeKey.java | 6 +- .../data/cassandra/domain/FlatGroup.java | 9 +- .../data/cassandra/domain/Group.java | 11 +- .../data/cassandra/domain/GroupKey.java | 13 +- .../data/cassandra/domain/Person.java | 8 +- .../domain/TypeWithCompositeKey.java | 6 +- .../cassandra/domain/TypeWithKeyClass.java | 6 +- .../data/cassandra/domain/TypeWithMapId.java | 6 +- .../data/cassandra/domain/UserToken.java | 6 +- ...BasicCassandraMappingContextUnitTests.java | 83 +---- ...istentEntityMetadataVerifierUnitTests.java | 42 +-- ...sistentEntityOrderPropertiesUnitTests.java | 2 +- ...sicCassandraPersistentEntityUnitTests.java | 17 +- ...cCassandraPersistentPropertyUnitTests.java | 41 +-- ...CassandraCompositePrimaryKeyUnitTests.java | 2 +- ...PersistentPropertyComparatorUnitTests.java | 57 +--- ...eyColumnAnnotationComparatorUnitTests.java | 20 +- ...ndraUserTypePersistentEntityUnitTests.java | 27 +- ...istentEntityMetadataVerifierUnitTests.java | 27 +- .../mapping/CompoundPrimaryKeyUnitTests.java | 2 +- ...BasicCassandraMappingContextUnitTests.java | 106 ++---- .../ForceQuotedEntitiesSimpleUnitTests.java | 2 +- .../ForceQuotedPropertiesSimpleUnitTests.java | 2 +- ...yClassEntityMetadataVerifierUnitTests.java | 75 ++--- .../VerifierMappingExceptionsUnitTests.java | 7 +- .../MultipackageScanningUnitTests.java | 2 +- .../mapping/multipackagescanning/Top.java | 2 +- .../multipackagescanning/first/First.java | 2 +- .../multipackagescanning/second/Second.java | 2 +- .../multipackagescanning/third/Third.java | 2 +- ...rtingReactiveCassandraRepositoryTests.java | 60 +--- ...veCassandraRepositoryIntegrationTests.java | 34 +- ...sitoryConfigurationExtensionUnitTests.java | 17 +- ...ssandraRepositoriesRegistrarUnitTests.java | 10 +- ...sitoryConfigurationExtensionUnitTests.java | 17 +- .../repository/conversion/Address.java | 2 +- .../repository/conversion/Contact.java | 14 +- ...dsParameterConversionIntegrationTests.java | 37 +-- .../ParameterConversionTestSupport.java | 5 +- .../repository/conversion/Phone.java | 2 +- ...dsParameterConversionIntegrationTests.java | 37 +-- ...yMethodParameterTypesIntegrationTests.java | 29 +- ...RepositoryReturnTypesIntegrationTests.java | 88 ++--- ...aParametersParameterAccessorUnitTests.java | 27 +- .../query/CassandraParametersUnitTests.java | 27 +- .../query/CassandraQueryCreatorUnitTests.java | 132 ++------ .../query/CassandraQueryMethodUnitTests.java | 17 +- .../ConvertingParameterAccessorUnitTests.java | 45 +-- .../ParameterBindingParserUnitTests.java | 37 +-- .../PartTreeCassandraQueryUnitTests.java | 42 +-- ...veCassandraParameterAccessorUnitTests.java | 35 +- ...ReactiveCassandraQueryMethodUnitTests.java | 30 +- ...activePartTreeCassandraQueryUnitTests.java | 30 +- ...iveStringBasedCassandraQueryUnitTests.java | 7 +- .../StringBasedCassandraQueryUnitTests.java | 95 ++---- .../query/StubParameterAccessor.java | 2 +- .../support/BasicMapIdUnitTests.java | 2 +- .../CassandraRepositoryFactoryUnitTests.java | 12 +- .../support/MapIdFactoryUnitTests.java | 2 +- ...veCassandraRepositoryFactoryUnitTests.java | 12 +- ...veCassandraRepositoryIntegrationTests.java | 145 ++------- ...tionsRowValueProviderIntegrationTests.java | 2 +- .../test/integration/composites/Comment.java | 2 +- .../integration/composites/CommentKey.java | 2 +- .../composites/CommentRepository.java | 2 +- .../CommentRepositoryIntegrationTests.java | 2 +- ...tRepositoryJavaConfigIntegrationTests.java | 2 +- ...ntRepositoryXmlConfigIntegrationTests.java | 2 +- .../integration/composites/Notification.java | 2 +- .../composites/NotificationPK.java | 2 +- .../test/integration/composites/Post.java | 2 +- .../test/integration/composites/PostPK.java | 2 +- .../test/integration/composites/Timeline.java | 2 +- .../integration/composites/TimelinePK.java | 2 +- .../CompositeKeyCrudIntegrationTests.java | 3 +- .../compositeprimarykey/Explicit.java | 2 +- .../compositeprimarykey/ExplicitKey.java | 2 +- .../ExplicitRepository.java | 2 +- ...eyRepositoryIntegrationTestsDelegator.java | 2 +- ...yRepositoryJavaConfigIntegrationTests.java | 2 +- ...tedCompositePrimaryKeyRepositoryTests.java | 6 +- ...eyRepositoryXmlConfigIntegrationTests.java | 2 +- .../compositeprimarykey/Implicit.java | 2 +- .../compositeprimarykey/ImplicitKey.java | 2 +- .../ImplicitRepository.java | 2 +- .../entity/CorrelationEntity.java | 2 +- .../forcequote/config/Explicit.java | 2 +- .../forcequote/config/ExplicitProperties.java | 2 +- .../config/ExplicitPropertiesRepository.java | 2 +- .../forcequote/config/ExplicitRepository.java | 2 +- ...ForceQuotedRepositoryIntegrationTests.java | 2 +- ...dRepositoryJavaConfigIntegrationTests.java | 2 +- .../config/ForceQuotedRepositoryTests.java | 2 +- ...edRepositoryXmlConfigIntegrationTests.java | 2 +- .../forcequote/config/Implicit.java | 2 +- .../forcequote/config/ImplicitProperties.java | 2 +- .../config/ImplicitPropertiesRepository.java | 2 +- .../forcequote/config/ImplicitRepository.java | 2 +- .../CustomConversionTests.java | 51 +-- ...ateMapIdProxyDelegateIntegrationTests.java | 2 +- .../mapid/repo/MultiPrimaryKeyColumns.java | 2 +- .../MultiPrimaryKeyColumnsRepository.java | 2 +- .../repo/RepositoryMapIdIntegrationTests.java | 2 +- .../SinglePrimaryKecColumnRepository.java | 2 +- .../mapid/repo/SinglePrimaryKeyColumn.java | 2 +- ...CassandraTemplateMapIdIntegrationTest.java | 2 +- .../CassandraTypeMappingIntegrationTest.java | 223 +++---------- .../mapping/types/CounterEntity.java | 12 +- .../integration/mapping/types/TimeEntity.java | 12 +- ...oluteMinimumXmlConfigIntegrationTests.java | 2 +- .../minimal/config/entities/AbsMin.java | 2 +- .../config/entities/AbsMinRepository.java | 2 +- .../cdi/CassandraOperationsProducer.java | 13 +- .../repository/cdi/CdiRepositoryClient.java | 2 +- .../repository/cdi/CdiRepositoryTests.java | 17 +- .../repository/cdi/CdiUserRepository.java | 2 +- .../repository/cdi/OtherQualifier.java | 3 +- .../cdi/QualifiedUserRepository.java | 3 +- .../cdi/SamplePersonRepository.java | 3 +- .../cdi/SamplePersonRepositoryCustom.java | 3 +- .../cdi/SamplePersonRepositoryImpl.java | 3 +- .../integration/repository/cdi/UserDB.java | 3 +- .../BigIntParamIntegrationTests.java | 2 +- .../querymethods/bigintparam/BigThing.java | 2 +- .../bigintparam/BigThingRepo.java | 2 +- .../datekey/DateKeyIntegrationTests.java | 2 +- .../querymethods/datekey/DateThing.java | 2 +- .../querymethods/datekey/DateThingRepo.java | 2 +- .../querymethods/declared/Address.java | 2 +- .../querymethods/declared/Person.java | 8 +- .../declared/QueryIntegrationTests.java | 7 +- .../PersonRepositoryWithQueryAnnotations.java | 2 +- .../anno/QueryAnnotationIntegrationTests.java | 2 +- .../declared/base/PersonRepository.java | 2 +- .../named/NamedQueryIntegrationTests.java | 2 +- .../PersonRepositoryWithNamedQueries.java | 2 +- .../derived/PersonRepository.java | 2 +- .../QueryDerivationIntegrationTests.java | 85 ++--- .../intparam/IntParamIntegrationTests.java | 2 +- .../querymethods/intparam/IntThing.java | 2 +- .../querymethods/intparam/IntThingRepo.java | 2 +- .../repository/simple/AddressType.java | 2 +- .../integration/repository/simple/User.java | 2 +- .../repository/simple/UserRepository.java | 4 +- .../UserRepositoryIntegrationTests.java | 10 +- ...erRepositoryIntegrationTestsDelegator.java | 7 +- ...omRepositoryBaseClassIntegrationTests.java | 7 +- ...rRepositoryJavaConfigIntegrationTests.java | 2 +- ...erRepositoryXmlConfigIntegrationTests.java | 2 +- .../test/integration/simpletons/Book.java | 8 +- .../integration/simpletons/BookCondition.java | 2 +- .../integration/simpletons/BookHistory.java | 5 +- .../integration/simpletons/BookReference.java | 5 +- .../test/integration/simpletons/LogEntry.java | 2 +- ...gDataEmbeddedCassandraIntegrationTest.java | 2 +- .../integration/support/CassandraVersion.java | 6 +- .../support/IntegrationTestConfig.java | 3 +- .../integration/support/SchemaTestUtils.java | 2 +- .../AnotherScannedEntity.java | 2 +- .../AnotherScannedEntityRepository.java | 2 +- .../xmlentityscanning/ScannedEntity.java | 2 +- .../ScannedEntityRepository.java | 2 +- .../XmlEntityScanningIntegrationTests.java | 2 +- .../java/reactor/test/TestSubscriber.java | 11 +- 265 files changed, 1379 insertions(+), 4066 deletions(-) diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlClusterFactoryBeanUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlClusterFactoryBeanUnitTests.java index b473a9d4d..884943009 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlClusterFactoryBeanUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlClusterFactoryBeanUnitTests.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. @@ -38,15 +38,10 @@ import com.datastax.driver.core.policies.SpeculativeExecutionPolicy; * * @author Mark Paluch * @author John Blum - * @see DATACASS-226 */ public class CassandraCqlClusterFactoryBeanUnitTests { - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldInitializeWithoutAnyOptions() throws Exception { CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean(); @@ -58,11 +53,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getConfiguration(bean).getMetricsOptions().isJMXReportingEnabled()).isTrue(); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldShutdownClusterInstance() throws Exception { CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean(); @@ -72,11 +63,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(bean.getObject().isClosed()).isTrue(); } - /** - * @see DATACASS-217 - * @throws Exception - */ - @Test + @Test // DATACASS-217 public void shouldSetLZ4CompressionType() throws Exception { CompressionType compressionType = CompressionType.LZ4; @@ -88,11 +75,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getProtocolOptions(bean).getCompression()).isEqualTo(Compression.LZ4); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetSnappyCompressionType() throws Exception { CompressionType compressionType = CompressionType.SNAPPY; @@ -104,11 +87,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getConfiguration(bean).getProtocolOptions().getCompression()).isEqualTo(Compression.SNAPPY); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetPoolingOptions() throws Exception { PoolingOptions poolingOptions = new PoolingOptions(); @@ -120,11 +99,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getConfiguration(bean).getPoolingOptions()).isEqualTo(poolingOptions); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetSocketOptions() throws Exception { SocketOptions socketOptions = new SocketOptions(); @@ -136,11 +111,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getConfiguration(bean).getSocketOptions()).isEqualTo(socketOptions); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetQueryOptions() throws Exception { QueryOptions queryOptions = new QueryOptions(); @@ -152,11 +123,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getConfiguration(bean).getQueryOptions()).isEqualTo(queryOptions); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void defaultQueryOptionsShouldHaveOwnObjectIdentity() throws Exception { QueryOptions queryOptions = new QueryOptions(); @@ -168,11 +135,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getConfiguration(bean).getQueryOptions()).isNotEqualTo(queryOptions); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetAuthProvider() throws Exception { AuthProvider authProvider = new PlainTextAuthProvider("x", "y"); @@ -184,12 +147,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getConfiguration(bean).getProtocolOptions().getAuthProvider()).isEqualTo(authProvider); } - /** - * @see DATACASS-226 - * @see DATACASS-263 - * @throws Exception - */ - @Test + @Test // DATACASS-226, DATACASS-263 public void shouldSetAuthenticationProvider() throws Exception { AuthProvider authProvider = new PlainTextAuthProvider("x", "y"); @@ -202,12 +160,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(result).isEqualTo(authProvider); } - /** - * @see DATACASS-226 - * @see DATACASS-263 - * @throws Exception - */ - @Test + @Test // DATACASS-226, DATACASS-263 public void shouldSetAuthentication() throws Exception { CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean(); @@ -221,11 +174,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(ReflectionTestUtils.getField(result, "password")).isEqualTo((Object) "password"); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetLoadBalancingPolicy() throws Exception { LoadBalancingPolicy loadBalancingPolicy = new RoundRobinPolicy(); @@ -237,11 +186,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getConfiguration(bean).getPolicies().getLoadBalancingPolicy()).isEqualTo(loadBalancingPolicy); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetReconnectionPolicy() throws Exception { ReconnectionPolicy reconnectionPolicy = new ExponentialReconnectionPolicy(1, 2); @@ -253,11 +198,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getConfiguration(bean).getPolicies().getReconnectionPolicy()).isEqualTo(reconnectionPolicy); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetProtocolVersion() throws Exception { CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean(); @@ -268,11 +209,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { .contains(ProtocolVersion.V2); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetSslOptions() throws Exception { SSLOptions sslOptions = JdkSSLOptions.builder().build(); @@ -285,11 +222,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getConfiguration(bean).getProtocolOptions().getSSLOptions()).isEqualTo(sslOptions); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldDisableMetrics() throws Exception { CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean(); @@ -299,11 +232,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getConfiguration(bean).getMetricsOptions().isEnabled()).isFalse(); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldDisableJmxReporting() throws Exception { CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean(); @@ -325,10 +254,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { verify(mockClusterBuilderConfigurer, times(1)).configure(isA(Cluster.Builder.class)); } - /** - * @see DATACASS-316 - */ - @Test + @Test // DATACASS-316 public void shouldSetAddressTranslator() throws Exception { AddressTranslator mockAddressTranslator = mock(AddressTranslator.class); @@ -340,10 +266,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getPolicies(bean).getAddressTranslator()).isEqualTo(mockAddressTranslator); } - /** - * @see DATACASS-317 - */ - @Test + @Test // DATACASS-317 public void shouldSetClusterNameWithBeanNameProperty() throws Exception { final Cluster.Builder mockClusterBuilder = mock(Cluster.Builder.class); @@ -364,10 +287,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { verify(mockClusterBuilder, times(1)).withClusterName(eq("ABC")); } - /** - * @see DATACASS-317 - */ - @Test + @Test // DATACASS-317 public void shouldSetClusterNameWithClusterNameProperty() throws Exception { final Cluster.Builder mockClusterBuilder = mock(Cluster.Builder.class); @@ -388,10 +308,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { verify(mockClusterBuilder, times(1)).withClusterName(eq("XYZ")); } - /** - * @see DATACASS-319 - */ - @Test + @Test // DATACASS-319 public void shouldSetMaxSchemaAgreementWaitSeconds() throws Exception { CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean(); @@ -402,10 +319,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getProtocolOptions(bean).getMaxSchemaAgreementWaitSeconds()).isEqualTo(20); } - /** - * @see DATACASS-320 - */ - @Test + @Test // DATACASS-320 public void shouldSetSpeculativeExecutionPolicy() throws Exception { SpeculativeExecutionPolicy mockSpeculativeExecutionPolicy = mock(SpeculativeExecutionPolicy.class); @@ -417,10 +331,7 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(getPolicies(bean).getSpeculativeExecutionPolicy()).isEqualTo(mockSpeculativeExecutionPolicy); } - /** - * @see DATACASS-238 - */ - @Test + @Test // DATACASS-238 public void shouldSetTimestampGenerator() throws Exception { TimestampGenerator mockTimestampGenerator = mock(TimestampGenerator.class); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlSessionFactoryBeanUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlSessionFactoryBeanUnitTests.java index cc342472b..be6a0dbef 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlSessionFactoryBeanUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlSessionFactoryBeanUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors + * Copyright 2013-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. @@ -24,6 +24,7 @@ import static org.mockito.Mockito.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.Collections; import java.util.List; import org.junit.Before; @@ -45,8 +46,6 @@ import com.datastax.driver.core.Session; * * @author John Blum * @see org.springframework.cassandra.config.CassandraCqlSessionFactoryBean - * @see expectedStartupScripts = asList("/path/to/schema.cql", "/path/to/data.cql"); + + List expectedStartupScripts = Arrays.asList("/path/to/schema.cql", "/path/to/data.cql"); CqlOperations mockCqlOperations = mock(CqlOperations.class); @@ -115,10 +107,10 @@ public class CassandraCqlSessionFactoryBeanUnitTests { verify(mockCqlOperations, times(1)).execute(eq(expectedStartupScripts.get(1))); } - @Test + @Test // DATACASS-219 public void connectToSystemKeyspace() { - when(mockCluster.connect()).thenReturn(mockSession); + when(mockCluster.connect()).thenReturn(mockSession); factoryBean.setCluster(mockCluster); assertThat(factoryBean.connect(null)).isEqualTo(mockSession); @@ -127,10 +119,10 @@ public class CassandraCqlSessionFactoryBeanUnitTests { verify(mockCluster, never()).connect(anyString()); } - @Test + @Test // DATACASS-219 public void connectToTargetKeyspace() { - when(mockCluster.connect(eq("TestKeyspace"))).thenReturn(mockSession); + when(mockCluster.connect(eq("TestKeyspace"))).thenReturn(mockSession); factoryBean.setCluster(mockCluster); assertThat(factoryBean.connect("TestKeyspace")).isEqualTo(mockSession); @@ -139,10 +131,10 @@ public class CassandraCqlSessionFactoryBeanUnitTests { verify(mockCluster, times(1)).connect(eq("TestKeyspace")); } - @Test + @Test // DATACASS-219 @SuppressWarnings("unchecked") public void destroySessionAndExecutesShutdownScripts() throws Exception { - List expectedShutdownScripts = asList("/path/to/shutdown.cql"); + List expectedShutdownScripts = Collections.singletonList("/path/to/shutdown.cql"); CqlOperations mockCqlOperations = mock(CqlOperations.class); @@ -159,35 +151,42 @@ public class CassandraCqlSessionFactoryBeanUnitTests { inOrder.verify(mockSession, times(1)).close(); } - @Test + @Test // DATACASS-219 public void isConnectedWithNullSessionIsFalse() { + assertThat(factoryBean.getObject()).isNull(); assertThat(factoryBean.isConnected()).isFalse(); } - @Test + @Test // DATACASS-219 public void isConnectedWithClosedSessionIsFalse() { - doReturn(mockSession).when(factoryBean).getObject(); + + when(factoryBean.getObject()).thenReturn(mockSession); when(mockSession.isClosed()).thenReturn(true); + assertThat(factoryBean.isConnected()).isFalse(); verify(mockSession, times(1)).isClosed(); } - @Test + @Test // DATACASS-219 public void isConnectedWithOpenSessionIsTrue() { - doReturn(mockSession).when(factoryBean).getObject(); + + when(factoryBean.getObject()).thenReturn(mockSession); when(mockSession.isClosed()).thenReturn(false); + assertThat(factoryBean.isConnected()).isTrue(); verify(mockSession, times(1)).isClosed(); } - @Test + @Test // DATACASS-219 public void setAndGetCluster() { + factoryBean.setCluster(mockCluster); + assertThat(factoryBean.getCluster()).isEqualTo(mockCluster); } - @Test + @Test // DATACASS-219 public void setClusterToNullThrowsIllegalArgumentException() { try { @@ -199,7 +198,7 @@ public class CassandraCqlSessionFactoryBeanUnitTests { } - @Test + @Test // DATACASS-219 public void getClusterWhenUninitializedThrowsIllegalStateException() { try { @@ -210,20 +209,19 @@ public class CassandraCqlSessionFactoryBeanUnitTests { } } - @Test + @Test // DATACASS-219 public void setAndGetKeyspaceName() { + assertThat(factoryBean.getKeyspaceName()).isNull(); factoryBean.setKeyspaceName("TEST"); - assertThat(factoryBean.getKeyspaceName()).isEqualTo("TEST"); factoryBean.setKeyspaceName(null); - assertThat(factoryBean.getKeyspaceName()).isNull(); } - @Test + @Test // DATACASS-219 public void getSessionWhenUninitializedThrowsIllegalStateException() { assertThat(factoryBean.getObject()).isNull(); @@ -237,26 +235,25 @@ public class CassandraCqlSessionFactoryBeanUnitTests { } - @Test + @Test // DATACASS-219 public void setAndGetStartupScripts() { + assertNonNullEmptyCollection(factoryBean.getStartupScripts()); - List expectedStartupScripts = asList("/path/to/schema.cql", "/path/to/data.cql"); - + List expectedStartupScripts = Arrays.asList("/path/to/schema.cql", "/path/to/data.cql"); factoryBean.setStartupScripts(expectedStartupScripts); List actualStartupScripts = factoryBean.getStartupScripts(); - assertThat(actualStartupScripts).isNotSameAs(expectedStartupScripts).isEqualTo(expectedStartupScripts); factoryBean.setStartupScripts(null); - assertNonNullEmptyCollection(factoryBean.getStartupScripts()); } - @Test + @Test // DATACASS-219 public void startupScriptsAreImmutable() { - List startupScripts = asList("/path/to/startup.cql"); + + List startupScripts = new ArrayList(Collections.singletonList("/path/to/startup.cql")); factoryBean.setStartupScripts(startupScripts); @@ -282,29 +279,26 @@ public class CassandraCqlSessionFactoryBeanUnitTests { @Test public void setAndGetShutdownScripts() { + assertNonNullEmptyCollection(factoryBean.getShutdownScripts()); - List expectedShutdownScripts = asList("/path/to/backup.cql", "/path/to/dropTables.cql"); - + List expectedShutdownScripts = Arrays.asList("/path/to/backup.cql", "/path/to/dropTables.cql"); factoryBean.setShutdownScripts(expectedShutdownScripts); List actualShutdownScripts = factoryBean.getShutdownScripts(); - assertThat(actualShutdownScripts).isEqualTo(expectedShutdownScripts).isNotSameAs(expectedShutdownScripts); factoryBean.setShutdownScripts(null); - assertNonNullEmptyCollection(factoryBean.getShutdownScripts()); } - @Test + @Test // DATACASS-219 public void shutdownScriptsAreImmutable() { - List shutdownScripts = asList("/path/to/shutdown.cql"); + List shutdownScripts = new ArrayList(Collections.singletonList("/path/to/shutdown.cql")); factoryBean.setShutdownScripts(shutdownScripts); List actualShutdownScripts = factoryBean.getShutdownScripts(); - assertThat(actualShutdownScripts).isEqualTo(shutdownScripts).isNotSameAs(shutdownScripts); shutdownScripts.add("/path/to/corruptSession.cql"); @@ -321,4 +315,10 @@ public class CassandraCqlSessionFactoryBeanUnitTests { assertThat(actualShutdownScripts).hasSize(1); } } + + private void assertNonNullEmptyCollection(Collection collection) { + + assertThat(collection).isNotNull(); + assertThat(collection.isEmpty()).isTrue(); + } } diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/PoolingOptionsFactoryBeanUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/PoolingOptionsFactoryBeanUnitTests.java index 791a6fcc4..944b0ae4a 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/config/PoolingOptionsFactoryBeanUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/config/PoolingOptionsFactoryBeanUnitTests.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. @@ -47,8 +47,6 @@ import com.datastax.driver.core.PoolingOptions; * @author David Webb * @author John Blum * @author Mark Paluch - * @see DATACASS-176 - * @see DATACASS-298 */ @RunWith(MockitoJUnitRunner.class) public class PoolingOptionsFactoryBeanUnitTests { @@ -63,7 +61,7 @@ public class PoolingOptionsFactoryBeanUnitTests { poolingOptionsFactoryBean = new PoolingOptionsFactoryBean(); } - @Test + @Test // DATACASS-176, DATACASS-298 public void getObjectReturnsNullWhenNotInitialized() throws Exception { assertThat(poolingOptionsFactoryBean.getObject()).isNull(); } @@ -79,11 +77,7 @@ public class PoolingOptionsFactoryBeanUnitTests { assertThat(poolingOptionsFactoryBean.isSingleton()).isTrue(); } - /** - * @see DATACASS-298 - * @see DATACASS-344 - */ - @Test + @Test // DATACASS-298, DATACASS-344 public void setAndGetFactoryBeanProperties() { poolingOptionsFactoryBean.setHeartbeatIntervalSeconds(15); @@ -113,10 +107,7 @@ public class PoolingOptionsFactoryBeanUnitTests { assertThat(poolingOptionsFactoryBean.getRemoteMinSimultaneousRequests()).isEqualTo(50); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void afterPropertiesSetInitializesLocalPoolingOptions() throws Exception { PoolingOptionsFactoryBean poolingOptionsFactoryBean = new PoolingOptionsFactoryBean() { @@ -157,10 +148,7 @@ public class PoolingOptionsFactoryBeanUnitTests { verify(poolingOptionsSpy, never()).setNewConnectionThreshold(eq(HostDistance.REMOTE), anyInt()); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void afterPropertiesSetInitializesRemotePoolingOptions() throws Exception { PoolingOptionsFactoryBean poolingOptionsFactoryBean = new PoolingOptionsFactoryBean() { @@ -201,10 +189,7 @@ public class PoolingOptionsFactoryBeanUnitTests { verify(poolingOptionsSpy, never()).setNewConnectionThreshold(eq(HostDistance.REMOTE), eq(5)); } - /** - * @see DATACASS-344 - */ - @Test + @Test // DATACASS-344 public void afterPropertiesSetInitializesMaxQueueSize() throws Exception { Method setMaxQueueSize = ReflectionUtils.findMethod(PoolingOptions.class, "setMaxQueueSize", int.class); @@ -234,11 +219,8 @@ public class PoolingOptionsFactoryBeanUnitTests { * driver class type... {@link PoolingOptions}! The max values should be set before setting core values. Otherwise the * core values will be compared with the default max values which is 8. Same for other min-max properties pairs. This * test checks the same. - * - * @throws Exception Any unhandled scenarios will result in a test failure. - * @see DATACASS-176 */ - @Test + @Test // DATACASS-176 public void afterPropertiesSetProperlySetsPoolingOptionsMaxBeforeMinProperties() throws Exception { poolingOptionsFactoryBean = new PoolingOptionsFactoryBean() { @@ -283,10 +265,7 @@ public class PoolingOptionsFactoryBeanUnitTests { verify(poolingOptions).setNewConnectionThreshold(eq(HostDistance.REMOTE), eq(111)); } - /** - * @see DATACASS-176 - */ - @Test + @Test // DATACASS-176 public void newLocalHostDistancePoolingOptionsReturnsLocalHostDistancePoolingOptionsFactoryBeanSettings() { poolingOptionsFactoryBean.setLocalCoreConnections(50); @@ -308,10 +287,7 @@ public class PoolingOptionsFactoryBeanUnitTests { assertThat(poolingOptions.getNewConnectionThreshold()).isEqualTo(100); } - /** - * @see DATACASS-176 - */ - @Test + @Test // DATACASS-176 public void newLocalHostDistancePoolingOptionsReturnsRemoteHostDistancePoolingOptionsFactoryBeanSettings() { poolingOptionsFactoryBean.setLocalCoreConnections(50); @@ -333,10 +309,7 @@ public class PoolingOptionsFactoryBeanUnitTests { assertThat(poolingOptions.getNewConnectionThreshold()).isEqualTo(40); } - /** - * @see DATACASS-176 - */ - @Test + @Test // DATACASS-176 public void configureLocalHostDistancePoolingOptionsCallsConfigureWithExpectedInstance() { final PoolingOptionsFactoryBean.HostDistancePoolingOptions mockHostDistancePoolingOptions = mock( @@ -362,10 +335,7 @@ public class PoolingOptionsFactoryBeanUnitTests { verify(mockHostDistancePoolingOptions).configure(same(poolingOptionsSpy)); } - /** - * @see DATACASS-176 - */ - @Test + @Test // DATACASS-176 public void configureRemoteHostDistancePoolingOptionsCallsConfigureWithExpectedInstance() { final PoolingOptionsFactoryBean.HostDistancePoolingOptions mockHostDistancePoolingOptions = mock( diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/java/AbstractClusterConfigurationUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/java/AbstractClusterConfigurationUnitTests.java index d8db161c5..0af2c7b9e 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/config/java/AbstractClusterConfigurationUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/config/java/AbstractClusterConfigurationUnitTests.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. @@ -45,15 +45,10 @@ import com.datastax.driver.core.policies.SpeculativeExecutionPolicy; * @author Mark Paluch * @author John Blum * @soundtrack Max Graham Feat Neev Kennedy - So Caught Up (Dns Project Remix) - * @see */ public class AbstractClusterConfigurationUnitTests { - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldInitializeWithoutAnyOptions() throws Exception { CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean(); @@ -68,11 +63,7 @@ public class AbstractClusterConfigurationUnitTests { assertThat(getConfiguration(cluster).getMetricsOptions().isJMXReportingEnabled()).isTrue(); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetCompressionType() throws Exception { final CompressionType compressionType = CompressionType.SNAPPY; @@ -88,11 +79,7 @@ public class AbstractClusterConfigurationUnitTests { assertThat(getConfiguration(cluster).getProtocolOptions().getCompression()).isEqualTo(Compression.SNAPPY); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetPoolingOptions() throws Exception { final PoolingOptions poolingOptions = new PoolingOptions(); @@ -108,11 +95,7 @@ public class AbstractClusterConfigurationUnitTests { assertThat(getConfiguration(cluster).getPoolingOptions()).isEqualTo(poolingOptions); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetSocketOptions() throws Exception { final SocketOptions socketOptions = new SocketOptions(); @@ -128,11 +111,7 @@ public class AbstractClusterConfigurationUnitTests { assertThat(getConfiguration(cluster).getSocketOptions()).isEqualTo(socketOptions); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetQueryOptions() throws Exception { final QueryOptions queryOptions = new QueryOptions(); @@ -148,11 +127,7 @@ public class AbstractClusterConfigurationUnitTests { assertThat(getConfiguration(cluster).getQueryOptions()).isEqualTo(queryOptions); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetAuthProvider() throws Exception { final AuthProvider authProvider = new PlainTextAuthProvider("x", "y"); @@ -168,11 +143,7 @@ public class AbstractClusterConfigurationUnitTests { assertThat(getConfiguration(cluster).getProtocolOptions().getAuthProvider()).isEqualTo(authProvider); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetLoadBalancingPolicy() throws Exception { final LoadBalancingPolicy loadBalancingPolicy = new RoundRobinPolicy(); @@ -188,11 +159,7 @@ public class AbstractClusterConfigurationUnitTests { assertThat(getConfiguration(cluster).getPolicies().getLoadBalancingPolicy()).isEqualTo(loadBalancingPolicy); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetReconnectionPolicy() throws Exception { final ReconnectionPolicy reconnectionPolicy = new ExponentialReconnectionPolicy(1, 2); @@ -208,11 +175,7 @@ public class AbstractClusterConfigurationUnitTests { assertThat(getConfiguration(cluster).getPolicies().getReconnectionPolicy()).isEqualTo(reconnectionPolicy); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldSetProtocolVersion() throws Exception { AbstractClusterConfiguration clusterConfiguration = new AbstractClusterConfiguration() { @@ -227,11 +190,7 @@ public class AbstractClusterConfigurationUnitTests { .contains(ProtocolVersion.V2); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test + @Test // DATACASS-226 public void shouldDisableMetrics() throws Exception { AbstractClusterConfiguration clusterConfiguration = new AbstractClusterConfiguration() { @@ -245,10 +204,7 @@ public class AbstractClusterConfigurationUnitTests { assertThat(getConfiguration(cluster).getMetricsOptions().isEnabled()).isFalse(); } - /** - * @see DATACASS-226 - */ - @Test + @Test // DATACASS-226 public void shouldSetKeyspaceCreations() { final List specification = Collections @@ -263,10 +219,7 @@ public class AbstractClusterConfigurationUnitTests { assertThat(clusterConfiguration.cluster().getKeyspaceCreations()).isEqualTo(specification); } - /** - * @see DATACASS-226 - */ - @Test + @Test // DATACASS-226 public void shouldSetKeyspaceDrops() { final List specification = Collections @@ -281,10 +234,7 @@ public class AbstractClusterConfigurationUnitTests { assertThat(clusterConfiguration.cluster().getKeyspaceDrops()).isEqualTo(specification); } - /** - * @see DATACASS-226 - */ - @Test + @Test // DATACASS-226 public void shouldSetStartupScripts() { final List scripts = Collections.singletonList("USE BLUE_METH; CREATE TABLE..."); @@ -298,10 +248,7 @@ public class AbstractClusterConfigurationUnitTests { assertThat(clusterConfiguration.cluster().getStartupScripts()).isEqualTo(scripts); } - /** - * @see DATACASS-226 - */ - @Test + @Test // DATACASS-226 public void shouldSetShutdownScripts() { final List scripts = Collections.singletonList("USE BLUE_METH; DROP TABLE..."); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/xml/CassandraCqlClusterParserUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/xml/CassandraCqlClusterParserUnitTests.java index f298672e3..9208128cc 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/config/xml/CassandraCqlClusterParserUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/config/xml/CassandraCqlClusterParserUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors + * Copyright 2013-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 CassandraCqlClusterParserUnitTests { private CassandraCqlClusterParser parser = new CassandraCqlClusterParser(); - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void resolveIdFromElement() { when(mockElement.getAttribute(eq(CassandraCqlClusterParser.ID_ATTRIBUTE))).thenReturn("test"); @@ -64,10 +61,7 @@ public class CassandraCqlClusterParserUnitTests { verify(mockElement).getAttribute(eq(CassandraCqlClusterParser.ID_ATTRIBUTE)); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void resolveIdUsingDefault() { when(mockElement.getAttribute(eq(CassandraCqlClusterParser.ID_ATTRIBUTE))).thenReturn(""); @@ -76,10 +70,7 @@ public class CassandraCqlClusterParserUnitTests { verify(mockElement).getAttribute(eq(CassandraCqlClusterParser.ID_ATTRIBUTE)); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void parseInternalCallsDoParseAndConstructsBeanDefinition() { BeanDefinition mockContainingBeanDefinition = mock(BeanDefinition.class); @@ -171,10 +162,7 @@ public class CassandraCqlClusterParserUnitTests { verify(mockElement).getAttribute(eq("username")); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void parseChildElementsWithLocalPoolingOptions() { Element localPoolingOptionsElement = mock(Element.class); @@ -228,10 +216,7 @@ public class CassandraCqlClusterParserUnitTests { verify(localPoolingOptionsElement).getAttribute(eq("min-simultaneous-requests")); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void parseChildElementsWithRemotePoolingOptions() { Element localPoolingOptionsElement = mock(Element.class); @@ -285,10 +270,7 @@ public class CassandraCqlClusterParserUnitTests { verify(localPoolingOptionsElement).getAttribute(eq("min-simultaneous-requests")); } - /** - * @see DATACASS-242 - */ - @Test + @Test // DATACASS-242 public void parseChildElementsWithStartupAndShutdownScripts() { Element mockStartupCqlOne = mock(Element.class, "MockStartupCqlOne"); @@ -322,10 +304,7 @@ public class CassandraCqlClusterParserUnitTests { assertThat(shutdownScripts).contains("DROP KEYSPACE test;", "DROP USER jblum;"); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void parseLocalPoolingOptionsProperlyConfiguresBeanDefinition() { when(mockElement.getAttribute(eq("core-connections"))).thenReturn("50"); @@ -362,10 +341,7 @@ public class CassandraCqlClusterParserUnitTests { verify(mockElement).getAttribute(eq("min-simultaneous-requests")); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void parseRemotePoolingOptionsProperlyConfiguresBeanDefinition() { when(mockElement.getAttribute(eq("core-connections"))).thenReturn("50"); @@ -402,10 +378,7 @@ public class CassandraCqlClusterParserUnitTests { verify(mockElement).getAttribute(eq("min-simultaneous-requests")); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void parseScript() { when(mockElement.getTextContent()).thenReturn("CREATE TABLE schema.table;"); @@ -413,10 +386,7 @@ public class CassandraCqlClusterParserUnitTests { verify(mockElement).getTextContent(); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void newSocketOptionsBeanDefinitionIsProperlyInitialized() { when(mockElement.getAttribute(eq("connect-timeout-millis"))).thenReturn("15000"); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/xml/ParsingUtilsUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/xml/ParsingUtilsUnitTests.java index 2af0756ea..00f8dafed 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/config/xml/ParsingUtilsUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/config/xml/ParsingUtilsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors + * Copyright 2013-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. @@ -36,10 +36,7 @@ public class ParsingUtilsUnitTests { @Rule public ExpectedException exception = ExpectedException.none(); - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void addOptionalReferencePropertyUsesDefault() { BeanDefinitionBuilder builder = ParsingUtils.addProperty(BeanDefinitionBuilder.genericBeanDefinition(), @@ -51,10 +48,7 @@ public class ParsingUtilsUnitTests { assertThat(propertyValue.getBeanName()).isEqualTo("defaultBeanReference"); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void addOptionalReferencePropertyWithNoValueDoesReturnsWithoutAdding() { BeanDefinitionBuilder builder = ParsingUtils.addProperty(BeanDefinitionBuilder.genericBeanDefinition(), @@ -66,10 +60,7 @@ public class ParsingUtilsUnitTests { assertThat(beanDefinition.getPropertyValues().isEmpty()).isTrue(); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void addOptionalValuePropertyUsesDefault() { BeanDefinitionBuilder builder = ParsingUtils.addProperty(BeanDefinitionBuilder.genericBeanDefinition(), @@ -80,10 +71,7 @@ public class ParsingUtilsUnitTests { assertThat(propertyValue).isEqualTo("defaultValue"); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void addOptionalValuePropertyWithNoValueDoesReturnsWithoutAdding() { BeanDefinitionBuilder builder = ParsingUtils.addProperty(BeanDefinitionBuilder.genericBeanDefinition(), @@ -95,10 +83,7 @@ public class ParsingUtilsUnitTests { assertThat(beanDefinition.getPropertyValues().isEmpty()).isTrue(); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void addRequiredReferencePropertyIsSuccessful() { BeanDefinitionBuilder builder = ParsingUtils.addProperty(BeanDefinitionBuilder.genericBeanDefinition(), @@ -110,10 +95,7 @@ public class ParsingUtilsUnitTests { assertThat(propertyValue.getBeanName()).isEqualTo("reference"); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void addRequiredReferencePropertyWithNoReferenceFails() { exception.expect(IllegalArgumentException.class); @@ -123,10 +105,7 @@ public class ParsingUtilsUnitTests { "defaultReference", true, true); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void addRequiredValuePropertyIsSuccessful() { BeanDefinitionBuilder builder = ParsingUtils.addProperty(BeanDefinitionBuilder.genericBeanDefinition(), @@ -137,10 +116,7 @@ public class ParsingUtilsUnitTests { assertThat(propertyValue).isEqualTo("value"); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void addRequiredValuePropertyWithNoValueFails() { exception.expect(IllegalArgumentException.class); @@ -150,10 +126,7 @@ public class ParsingUtilsUnitTests { false); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void addPropertyThrowsIllegalArgumentExceptionForNullBuilder() { exception.expect(IllegalArgumentException.class); @@ -162,10 +135,7 @@ public class ParsingUtilsUnitTests { ParsingUtils.addProperty(null, "propertyName", "value", "defaultValue", false, false); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void addPropertyThrowsIllegalArgumentExceptionForNullPropertyName() { exception.expect(IllegalArgumentException.class); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/AsyncCqlTemplateIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/AsyncCqlTemplateIntegrationTests.java index 460e428ce..18e710b04 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/AsyncCqlTemplateIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/AsyncCqlTemplateIntegrationTests.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. @@ -54,10 +54,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn template.setSession(getSession()); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeShouldRemoveRecords() throws Exception { template.execute("DELETE FROM user WHERE id = 'WHITE'").get(); @@ -65,10 +62,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn assertThat(session.execute("SELECT * FROM user").one()).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryShouldInvokeCallback() throws Exception { List result = new ArrayList<>(); @@ -79,10 +73,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn assertThat(result).contains("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectShouldReturnFirstColumn() throws Exception { String id = template.queryForObject("SELECT id FROM user;", String.class).get(); @@ -90,10 +81,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn assertThat(id).isEqualTo("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectShouldReturnMap() throws Exception { Map map = template.queryForMap("SELECT * FROM user;").get(); @@ -101,10 +89,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn assertThat(map).containsEntry("id", "WHITE").containsEntry("username", "Walter"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeStatementShouldRemoveRecords() throws Exception { template.execute(QueryBuilder.delete().from("user").where(QueryBuilder.eq("id", "WHITE"))).get(); @@ -112,10 +97,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn assertThat(session.execute("SELECT * FROM user").one()).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryStatementShouldInvokeCallback() throws Exception { List result = new ArrayList<>(); @@ -126,10 +108,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn assertThat(result).contains("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementShouldReturnFirstColumn() throws Exception { String id = template.queryForObject(QueryBuilder.select("id").from("user"), String.class).get(); @@ -137,10 +116,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn assertThat(id).isEqualTo("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementShouldReturnMap() throws Exception { Map map = template.queryForMap(QueryBuilder.select().from("user")).get(); @@ -148,10 +124,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn assertThat(map).containsEntry("id", "WHITE").containsEntry("username", "Walter"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeWithArgsShouldRemoveRecords() throws Exception { template.execute("DELETE FROM user WHERE id = ?", "WHITE").get(); @@ -159,10 +132,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn assertThat(session.execute("SELECT * FROM user").one()).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementShouldInvokeCallback() throws Exception { List result = new ArrayList<>(); @@ -173,10 +143,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn assertThat(result).contains("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorShouldInvokeCallback() throws Exception { List result = new ArrayList<>(); @@ -190,10 +157,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn assertThat(result).contains("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectWithArgsShouldReturnFirstColumn() throws Exception { String id = template.queryForObject("SELECT id FROM user WHERE id = ?;", String.class, "WHITE").get(); @@ -201,10 +165,7 @@ public class AsyncCqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIn assertThat(id).isEqualTo("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectWithArgsShouldReturnMap() throws Exception { Map map = template.queryForMap("SELECT * FROM user WHERE id = ?;", "WHITE").get(); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/AsyncCqlTemplateUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/AsyncCqlTemplateUnitTests.java index a33b73ffd..b0f18b4bb 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/AsyncCqlTemplateUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/AsyncCqlTemplateUnitTests.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. @@ -77,10 +77,7 @@ public class AsyncCqlTemplateUnitTests { // Tests dealing with a plain com.datastax.driver.core.Session // ------------------------------------------------------------------------- - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeCallbackShouldTranslateExceptions() throws Exception { try { @@ -94,10 +91,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeCqlShouldTranslateExceptions() throws Exception { TestResultSetFuture resultSetFuture = TestResultSetFuture @@ -120,10 +114,7 @@ public class AsyncCqlTemplateUnitTests { // Tests dealing with static CQL // ------------------------------------------------------------------------- - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeCqlShouldCallExecution() { doTestStrings(null, null, null, asyncCqlTemplate -> { @@ -134,10 +125,7 @@ public class AsyncCqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeCqlWithArgumentsShouldCallExecution() { doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, asyncCqlTemplate -> { @@ -148,10 +136,7 @@ public class AsyncCqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForResultSetShouldCallExecution() { doTestStrings(null, null, null, asyncCqlTemplate -> { @@ -163,10 +148,7 @@ public class AsyncCqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryWithResultSetExtractorShouldCallExecution() { doTestStrings(null, null, null, asyncCqlTemplate -> { @@ -179,10 +161,7 @@ public class AsyncCqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryWithResultSetExtractorWithArgumentsShouldCallExecution() { doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, asyncCqlTemplate -> { @@ -195,10 +174,7 @@ public class AsyncCqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryCqlShouldTranslateExceptions() throws Exception { TestResultSetFuture resultSetFuture = TestResultSetFuture @@ -217,10 +193,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectCqlShouldBeEmpty() throws Exception { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -238,10 +211,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectCqlShouldReturnRecord() { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -251,10 +221,7 @@ public class AsyncCqlTemplateUnitTests { assertThat(getUninterruptibly(future)).isEqualTo("OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectCqlShouldReturnNullValue() { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -264,10 +231,7 @@ public class AsyncCqlTemplateUnitTests { assertThat(getUninterruptibly(future)).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectCqlShouldFailReturningManyRecords() throws Exception { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -284,10 +248,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectCqlWithTypeShouldReturnRecord() { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -301,10 +262,7 @@ public class AsyncCqlTemplateUnitTests { assertThat(getUninterruptibly(future)).isEqualTo("OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForListCqlWithTypeShouldReturnRecord() { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -318,10 +276,7 @@ public class AsyncCqlTemplateUnitTests { assertThat(getUninterruptibly(future)).contains("OK", "NOT OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeCqlShouldReturnWasApplied() { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -336,10 +291,7 @@ public class AsyncCqlTemplateUnitTests { // Tests dealing with com.datastax.driver.core.Statement // ------------------------------------------------------------------------- - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeStatementShouldCallExecution() { doTestStrings(null, null, null, asyncCqlTemplate -> { @@ -350,10 +302,7 @@ public class AsyncCqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeStatementWithArgumentsShouldCallExecution() { doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, asyncCqlTemplate -> { @@ -364,10 +313,7 @@ public class AsyncCqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForResultStatementSetShouldCallExecution() { doTestStrings(null, null, null, asyncCqlTemplate -> { @@ -380,10 +326,7 @@ public class AsyncCqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryWithResultSetStatementExtractorShouldCallExecution() { doTestStrings(null, null, null, asyncCqlTemplate -> { @@ -396,10 +339,7 @@ public class AsyncCqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryWithResultSetStatementExtractorWithArgumentsShouldCallExecution() { doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, asyncCqlTemplate -> { @@ -412,10 +352,7 @@ public class AsyncCqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryStatementShouldTranslateExceptions() throws Exception { TestResultSetFuture resultSetFuture = TestResultSetFuture @@ -435,10 +372,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementShouldBeEmpty() throws Exception { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -457,10 +391,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementShouldReturnRecord() { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -471,10 +402,7 @@ public class AsyncCqlTemplateUnitTests { assertThat(getUninterruptibly(future)).isEqualTo("OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementShouldReturnNullValue() { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -485,10 +413,7 @@ public class AsyncCqlTemplateUnitTests { assertThat(getUninterruptibly(future)).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementShouldFailReturningManyRecords() throws Exception { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -506,10 +431,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementWithTypeShouldReturnRecord() { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -523,10 +445,7 @@ public class AsyncCqlTemplateUnitTests { assertThat(getUninterruptibly(future)).isEqualTo("OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForListStatementWithTypeShouldReturnRecord() { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -541,10 +460,7 @@ public class AsyncCqlTemplateUnitTests { assertThat(getUninterruptibly(future)).contains("OK", "NOT OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeStatementShouldReturnWasApplied() { when(session.executeAsync(any(Statement.class))).thenReturn(new TestResultSetFuture(resultSet)); @@ -559,10 +475,7 @@ public class AsyncCqlTemplateUnitTests { // Methods dealing with prepared statements // ------------------------------------------------------------------------- - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementWithCallbackShouldCallExecution() { doTestStrings(null, null, null, asyncCqlTemplate -> { @@ -579,10 +492,7 @@ public class AsyncCqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executePreparedStatementWithCallbackShouldCallExecution() { doTestStrings(null, null, null, asyncCqlTemplate -> { @@ -596,10 +506,7 @@ public class AsyncCqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executePreparedStatementCreatorShouldTranslateStatementCreationExceptions() throws Exception { when(session.executeAsync(boundStatement)).thenReturn(new TestResultSetFuture(resultSet)); @@ -628,10 +535,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executePreparedStatementCreatorShouldTranslateStatementCallbackExceptions() throws Exception { when(session.executeAsync(boundStatement)).thenReturn(new TestResultSetFuture(resultSet)); @@ -652,10 +556,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorShouldReturnResult() { when(session.prepareAsync(anyString())).thenReturn(new TestPreparedStatementFuture(preparedStatement)); @@ -670,10 +571,7 @@ public class AsyncCqlTemplateUnitTests { verify(preparedStatement).bind(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorAndBinderShouldReturnResult() { when(preparedStatement.bind()).thenReturn(boundStatement); @@ -689,10 +587,7 @@ public class AsyncCqlTemplateUnitTests { verify(preparedStatement).bind("a", "b"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorAndBinderShouldTranslatePrepareStatementExceptions() throws Exception { when(preparedStatement.bind()).thenReturn(boundStatement); @@ -712,10 +607,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorAndBinderShouldTranslateBindExceptions() throws Exception { when(preparedStatement.bind()).thenReturn(boundStatement); @@ -732,10 +624,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorAndBinderShouldTranslateExecutionExceptions() throws Exception { when(preparedStatement.bind()).thenReturn(boundStatement); @@ -758,10 +647,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorAndBinderAndMapperShouldReturnResult() { when(preparedStatement.bind()).thenReturn(boundStatement); @@ -777,10 +663,7 @@ public class AsyncCqlTemplateUnitTests { verify(preparedStatement).bind("a", "b"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectPreparedStatementShouldBeEmpty() throws Exception { when(session.prepareAsync("SELECT * FROM user WHERE username = ?")) @@ -802,10 +685,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectPreparedStatementShouldReturnRecord() { when(session.prepareAsync("SELECT * FROM user WHERE username = ?")) @@ -819,10 +699,7 @@ public class AsyncCqlTemplateUnitTests { assertThat(getUninterruptibly(future)).isEqualTo("OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectPreparedStatementShouldFailReturningManyRecords() throws Exception { when(session.prepareAsync("SELECT * FROM user WHERE username = ?")) @@ -843,10 +720,7 @@ public class AsyncCqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectPreparedStatementWithTypeShouldReturnRecord() { when(session.prepareAsync("SELECT * FROM user WHERE username = ?")) @@ -863,10 +737,7 @@ public class AsyncCqlTemplateUnitTests { assertThat(getUninterruptibly(future)).isEqualTo("OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForListPreparedStatementWithTypeShouldReturnRecord() { when(session.prepareAsync("SELECT * FROM user WHERE username = ?")) @@ -884,10 +755,7 @@ public class AsyncCqlTemplateUnitTests { assertThat(getUninterruptibly(future)).contains("OK", "NOT OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void updatePreparedStatementShouldReturnApplied() { when(session.prepareAsync("UPDATE user SET username = ?")) diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/CachedPreparedStatementCreatorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/CachedPreparedStatementCreatorUnitTests.java index c66e3581c..fcca5805c 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/CachedPreparedStatementCreatorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/CachedPreparedStatementCreatorUnitTests.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. @@ -20,6 +20,8 @@ import static org.assertj.core.api.Assertions.*; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.*; +import edu.umd.cs.mtc.MultithreadedTestCase; + import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; @@ -34,13 +36,10 @@ import org.mockito.runners.MockitoJUnitRunner; import com.datastax.driver.core.PreparedStatement; import com.datastax.driver.core.Session; -import edu.umd.cs.mtc.MultithreadedTestCase; - /** * Unit tests for {@link CachedPreparedStatementCreator}. * * @author Mark Paluch - * @see DATACASS-253 */ @RunWith(MockitoJUnitRunner.class) public class CachedPreparedStatementCreatorUnitTests { @@ -55,26 +54,17 @@ public class CachedPreparedStatementCreatorUnitTests { when(sessionMock.prepare(anyString())).thenReturn(preparedStatement); } - /** - * @see DATACASS-253 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-253 public void shouldRejectEmptyCql() { new CachedPreparedStatementCreator(""); } - /** - * @see DATACASS-253 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-253 public void shouldRejectNullCql() { new CachedPreparedStatementCreator(null); } - /** - * @see DATACASS-253 - */ - @Test + @Test // DATACASS-253 public void shouldCreatePreparedStatement() { CachedPreparedStatementCreator cachedPreparedStatementCreator = new CachedPreparedStatementCreator("my cql"); @@ -85,10 +75,7 @@ public class CachedPreparedStatementCreatorUnitTests { verify(sessionMock).prepare("my cql"); } - /** - * @see DATACASS-253 - */ - @Test + @Test // DATACASS-253 public void shouldCacheCreatePreparedStatement() { CachedPreparedStatementCreator cachedPreparedStatementCreator = new CachedPreparedStatementCreator("my cql"); @@ -102,11 +89,7 @@ public class CachedPreparedStatementCreatorUnitTests { verify(sessionMock, times(1)).prepare("my cql"); } - /** - * @see DATACASS-253 - * @throws Throwable - */ - @Test + @Test // DATACASS-253 public void concurrentAccessToCreateStatementShouldBeSynchronized() throws Throwable { CreatePreparedStatementIsThreadSafe concurrentPrepareStatement = new CreatePreparedStatementIsThreadSafe( diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/ConsistencyLevelResolverUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/ConsistencyLevelResolverUnitTests.java index 1ab994de0..12b0b75d3 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/ConsistencyLevelResolverUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/ConsistencyLevelResolverUnitTests.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. @@ -32,7 +32,6 @@ import org.junit.runners.Parameterized.Parameters; * Unit tests for {@link ConsistencyLevelResolver}. * * @author Mark Paluch - * @see DATACASS-202 */ @RunWith(Parameterized.class) public class ConsistencyLevelResolverUnitTests { @@ -80,10 +79,7 @@ public class ConsistencyLevelResolverUnitTests { return parameters; } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void shouldResolveCorrectly() { assertThat(ConsistencyLevelResolver.resolve(from)).isEqualTo(expected); } diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateIntegrationTests.java index 01ca49adb..41689d455 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateIntegrationTests.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. @@ -53,10 +53,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra template.setSession(getSession()); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeShouldRemoveRecords() throws Exception { template.execute("DELETE FROM user WHERE id = 'WHITE'"); @@ -64,10 +61,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra assertThat(session.execute("SELECT * FROM user").one()).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryShouldInvokeCallback() throws Exception { List result = new ArrayList<>(); @@ -78,10 +72,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra assertThat(result).contains("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectShouldReturnFirstColumn() throws Exception { String id = template.queryForObject("SELECT id FROM user;", String.class); @@ -89,10 +80,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra assertThat(id).isEqualTo("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectShouldReturnMap() throws Exception { Map map = template.queryForMap("SELECT * FROM user;"); @@ -100,10 +88,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra assertThat(map).containsEntry("id", "WHITE").containsEntry("username", "Walter"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeStatementShouldRemoveRecords() throws Exception { template.execute(QueryBuilder.delete().from("user").where(QueryBuilder.eq("id", "WHITE"))); @@ -111,10 +96,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra assertThat(session.execute("SELECT * FROM user").one()).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryStatementShouldInvokeCallback() throws Exception { List result = new ArrayList<>(); @@ -125,10 +107,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra assertThat(result).contains("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementShouldReturnFirstColumn() throws Exception { String id = template.queryForObject(QueryBuilder.select("id").from("user"), String.class); @@ -136,10 +115,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra assertThat(id).isEqualTo("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementShouldReturnMap() throws Exception { Map map = template.queryForMap(QueryBuilder.select().from("user")); @@ -147,10 +123,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra assertThat(map).containsEntry("id", "WHITE").containsEntry("username", "Walter"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeWithArgsShouldRemoveRecords() throws Exception { template.execute("DELETE FROM user WHERE id = ?", "WHITE"); @@ -158,10 +131,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra assertThat(session.execute("SELECT * FROM user").one()).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementShouldInvokeCallback() throws Exception { List result = new ArrayList<>(); @@ -172,10 +142,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra assertThat(result).contains("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorShouldInvokeCallback() throws Exception { List result = new ArrayList<>(); @@ -186,10 +153,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra assertThat(result).contains("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectWithArgsShouldReturnFirstColumn() throws Exception { String id = template.queryForObject("SELECT id FROM user WHERE id = ?;", String.class, "WHITE"); @@ -197,10 +161,7 @@ public class CqlTemplateIntegrationTests extends AbstractKeyspaceCreatingIntegra assertThat(id).isEqualTo("WHITE"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectWithArgsShouldReturnMap() throws Exception { Map map = template.queryForMap("SELECT * FROM user WHERE id = ?;", "WHITE"); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateUnitTests.java index 0fbe254f6..a0dc5f408 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateUnitTests.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. @@ -76,10 +76,7 @@ public class CqlTemplateUnitTests { // Tests dealing with a plain com.datastax.driver.core.Session // ------------------------------------------------------------------------- - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeCallbackShouldTranslateExceptions() { try { @@ -93,10 +90,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeCqlShouldTranslateExceptions() { when(session.execute(any(Statement.class))).thenThrow(new NoHostAvailableException(Collections.emptyMap())); @@ -113,10 +107,7 @@ public class CqlTemplateUnitTests { // Tests dealing with static CQL // ------------------------------------------------------------------------- - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeCqlShouldCallExecution() { doTestStrings(null, null, null, cqlTemplate -> { @@ -127,10 +118,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeCqlWithArgumentsShouldCallExecution() { doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, cqlTemplate -> { @@ -141,10 +129,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForResultSetShouldCallExecution() { doTestStrings(null, null, null, cqlTemplate -> { @@ -156,10 +141,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryWithResultSetExtractorShouldCallExecution() { doTestStrings(null, null, null, cqlTemplate -> { @@ -171,10 +153,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryWithResultSetExtractorWithArgumentsShouldCallExecution() { doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, cqlTemplate -> { @@ -186,10 +165,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryCqlShouldTranslateExceptions() { when(session.execute(any(Statement.class))).thenThrow(new NoHostAvailableException(Collections.emptyMap())); @@ -202,10 +178,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectCqlShouldBeEmpty() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -219,10 +192,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectCqlShouldReturnRecord() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -232,10 +202,7 @@ public class CqlTemplateUnitTests { assertThat(result).isEqualTo("OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectCqlShouldReturnNullValue() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -245,10 +212,7 @@ public class CqlTemplateUnitTests { assertThat(result).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectCqlShouldFailReturningManyRecords() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -262,10 +226,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectCqlWithTypeShouldReturnRecord() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -279,10 +240,7 @@ public class CqlTemplateUnitTests { assertThat(result).isEqualTo("OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForListCqlWithTypeShouldReturnRecord() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -296,10 +254,7 @@ public class CqlTemplateUnitTests { assertThat(result).contains("OK", "NOT OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeCqlShouldReturnWasApplied() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -314,10 +269,7 @@ public class CqlTemplateUnitTests { // Tests dealing with com.datastax.driver.core.Statement // ------------------------------------------------------------------------- - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeStatementShouldCallExecution() { doTestStrings(null, null, null, cqlTemplate -> { @@ -328,10 +280,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeStatementWithArgumentsShouldCallExecution() { doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, cqlTemplate -> { @@ -342,10 +291,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForResultStatementSetShouldCallExecution() { doTestStrings(null, null, null, cqlTemplate -> { @@ -357,10 +303,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryWithResultSetStatementExtractorShouldCallExecution() { doTestStrings(null, null, null, cqlTemplate -> { @@ -373,10 +316,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryWithResultSetStatementExtractorWithArgumentsShouldCallExecution() { doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, cqlTemplate -> { @@ -389,10 +329,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryStatementShouldTranslateExceptions() { when(session.execute(any(Statement.class))).thenThrow(new NoHostAvailableException(Collections.emptyMap())); @@ -406,10 +343,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementShouldBeEmpty() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -424,10 +358,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementShouldReturnRecord() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -437,10 +368,7 @@ public class CqlTemplateUnitTests { assertThat(result).isEqualTo("OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementShouldReturnNullValue() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -450,10 +378,7 @@ public class CqlTemplateUnitTests { assertThat(result).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementShouldFailReturningManyRecords() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -468,10 +393,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectStatementWithTypeShouldReturnRecord() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -485,10 +407,7 @@ public class CqlTemplateUnitTests { assertThat(result).isEqualTo("OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForListStatementWithTypeShouldReturnRecord() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -502,10 +421,7 @@ public class CqlTemplateUnitTests { assertThat(result).contains("OK", "NOT OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executeStatementShouldReturnWasApplied() { when(session.execute(any(Statement.class))).thenReturn(resultSet); @@ -520,10 +436,7 @@ public class CqlTemplateUnitTests { // Methods dealing with prepared statements // ------------------------------------------------------------------------- - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementWithCallbackShouldCallExecution() { doTestStrings(null, null, null, cqlTemplate -> { @@ -539,10 +452,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executePreparedStatementWithCallbackShouldCallExecution() { doTestStrings(null, null, null, cqlTemplate -> { @@ -556,10 +466,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executePreparedStatementCreatorShouldTranslateStatementCreationExceptions() { when(session.execute(boundStatement)).thenReturn(resultSet); @@ -576,10 +483,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void executePreparedStatementCreatorShouldTranslateStatementCallbackExceptions() { when(session.execute(boundStatement)).thenReturn(resultSet); @@ -596,10 +500,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorShouldReturnResult() { when(session.prepare(anyString())).thenReturn(preparedStatement); @@ -613,10 +514,7 @@ public class CqlTemplateUnitTests { verify(preparedStatement).bind(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorAndBinderShouldReturnResult() { when(preparedStatement.bind()).thenReturn(boundStatement); @@ -632,10 +530,7 @@ public class CqlTemplateUnitTests { verify(preparedStatement).bind("a", "b"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorAndBinderShouldTranslatePrepareStatementExceptions() { when(preparedStatement.bind()).thenReturn(boundStatement); @@ -654,10 +549,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorAndBinderShouldTranslateBindExceptions() { when(preparedStatement.bind()).thenReturn(boundStatement); @@ -673,10 +565,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorAndBinderShouldTranslateExecutionExceptions() { when(preparedStatement.bind()).thenReturn(boundStatement); @@ -694,10 +583,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryPreparedStatementCreatorAndBinderAndMapperShouldReturnResult() { when(preparedStatement.bind()).thenReturn(boundStatement); @@ -713,10 +599,7 @@ public class CqlTemplateUnitTests { verify(preparedStatement).bind("a", "b"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectPreparedStatementShouldBeEmpty() { when(session.prepare("SELECT * FROM user WHERE username = ?")).thenReturn(preparedStatement); @@ -733,10 +616,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectPreparedStatementShouldReturnRecord() { when(session.prepare("SELECT * FROM user WHERE username = ?")).thenReturn(preparedStatement); @@ -748,10 +628,7 @@ public class CqlTemplateUnitTests { assertThat(result).isEqualTo("OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectPreparedStatementShouldFailReturningManyRecords() { when(session.prepare("SELECT * FROM user WHERE username = ?")).thenReturn(preparedStatement); @@ -768,10 +645,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForObjectPreparedStatementWithTypeShouldReturnRecord() { when(session.prepare("SELECT * FROM user WHERE username = ?")).thenReturn(preparedStatement); @@ -787,10 +661,7 @@ public class CqlTemplateUnitTests { assertThat(result).isEqualTo("OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void queryForListPreparedStatementWithTypeShouldReturnRecord() { when(session.prepare("SELECT * FROM user WHERE username = ?")).thenReturn(preparedStatement); @@ -806,10 +677,7 @@ public class CqlTemplateUnitTests { assertThat(result).contains("OK", "NOT OK"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void updatePreparedStatementShouldReturnApplied() { when(session.prepare("UPDATE user SET username = ?")).thenReturn(preparedStatement); @@ -822,7 +690,6 @@ public class CqlTemplateUnitTests { assertThat(applied).isTrue(); } - private void doTestStrings(Integer fetchSize, ConsistencyLevel consistencyLevel, com.datastax.driver.core.policies.RetryPolicy retryPolicy, Consumer cqlTemplateConsumer) { diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/DefaultBridgedReactiveSessionIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/DefaultBridgedReactiveSessionIntegrationTests.java index 345e6edcd..998f5b849 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/DefaultBridgedReactiveSessionIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/DefaultBridgedReactiveSessionIntegrationTests.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. @@ -17,6 +17,9 @@ package org.springframework.cassandra.core; import static org.assertj.core.api.Assertions.*; +import reactor.core.publisher.Mono; +import reactor.core.scheduler.Schedulers; + import org.junit.Before; import org.junit.Test; import org.springframework.cassandra.test.integration.AbstractKeyspaceCreatingIntegrationTest; @@ -26,9 +29,6 @@ import com.datastax.driver.core.PreparedStatement; import com.datastax.driver.core.Row; import com.datastax.driver.core.exceptions.SyntaxError; -import reactor.core.publisher.Mono; -import reactor.core.scheduler.Schedulers; - /** * Integration tests for {@link DefaultBridgedReactiveSession}. * @@ -46,10 +46,7 @@ public class DefaultBridgedReactiveSessionIntegrationTests extends AbstractKeysp this.reactiveSession = new DefaultBridgedReactiveSession(this.session, Schedulers.elastic()); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeShouldExecuteDeferred() throws Exception { Mono execution = reactiveSession @@ -64,10 +61,7 @@ public class DefaultBridgedReactiveSessionIntegrationTests extends AbstractKeysp assertThat(keyspace.getTable("users")).isNotNull(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeShouldTransportExceptionsInMono() throws Exception { Mono execution = reactiveSession.execute("INSERT INTO dummy;"); @@ -80,10 +74,7 @@ public class DefaultBridgedReactiveSessionIntegrationTests extends AbstractKeysp } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeShouldReturnRows() throws Exception { session.execute("CREATE TABLE users (\n" + " userid text PRIMARY KEY,\n" + " first_name text\n" + ");"); @@ -97,10 +88,7 @@ public class DefaultBridgedReactiveSessionIntegrationTests extends AbstractKeysp assertThat(row.getString("userid")).isEqualTo("White"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeShouldPrepareStatement() throws Exception { session.execute("CREATE TABLE users (\n" + " userid text PRIMARY KEY,\n" + " first_name text\n" + ");"); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/DefaultBridgedReactiveSessionUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/DefaultBridgedReactiveSessionUnitTests.java index 29ea6d254..95915109b 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/DefaultBridgedReactiveSessionUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/DefaultBridgedReactiveSessionUnitTests.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. @@ -18,6 +18,8 @@ package org.springframework.cassandra.core; import static org.assertj.core.api.Assertions.*; import static org.mockito.Mockito.*; +import reactor.core.scheduler.Schedulers; + import java.util.Collections; import org.hamcrest.core.IsEqual; @@ -33,8 +35,6 @@ import com.datastax.driver.core.Session; import com.datastax.driver.core.SimpleStatement; import com.datastax.driver.core.Statement; -import reactor.core.scheduler.Schedulers; - /** * Unit tests for {@link DefaultBridgedReactiveSession}. * @@ -52,10 +52,7 @@ public class DefaultBridgedReactiveSessionUnitTests { reactiveSession = new DefaultBridgedReactiveSession(sessionMock, Schedulers.immediate()); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeStatementShouldForwardStatementToSession() throws Exception { SimpleStatement statement = new SimpleStatement("SELECT *"); @@ -64,10 +61,7 @@ public class DefaultBridgedReactiveSessionUnitTests { verify(sessionMock).executeAsync(statement); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeShouldForwardStatementToSession() throws Exception { reactiveSession.execute("SELECT *").subscribe(); @@ -75,10 +69,7 @@ public class DefaultBridgedReactiveSessionUnitTests { verify(sessionMock).executeAsync(eq(new SimpleStatement("SELECT *"))); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeWithValuesShouldForwardStatementToSession() throws Exception { reactiveSession.execute("SELECT * WHERE a = ? and b = ?", "A", "B").subscribe(); @@ -86,10 +77,7 @@ public class DefaultBridgedReactiveSessionUnitTests { verify(sessionMock).executeAsync(eq(new SimpleStatement("SELECT * WHERE a = ? and b = ?", "A", "B"))); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeWithValueMapShouldForwardStatementToSession() throws Exception { reactiveSession.execute("SELECT * WHERE a = ?", Collections.singletonMap("a", "value")).subscribe(); @@ -98,10 +86,7 @@ public class DefaultBridgedReactiveSessionUnitTests { .executeAsync(eq(new SimpleStatement("SELECT * WHERE a = ?", Collections.singletonMap("a", "value")))); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void testPrepareQuery() throws Exception { reactiveSession.prepare("SELECT *").subscribe(); @@ -109,10 +94,7 @@ public class DefaultBridgedReactiveSessionUnitTests { verify(sessionMock).prepareAsync(eq(new SimpleStatement("SELECT *"))); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void testPrepareStatement() throws Exception { SimpleStatement statement = new SimpleStatement("SELECT *"); @@ -121,10 +103,7 @@ public class DefaultBridgedReactiveSessionUnitTests { verify(sessionMock).prepareAsync(statement); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void testClose() throws Exception { reactiveSession.close(); @@ -132,10 +111,7 @@ public class DefaultBridgedReactiveSessionUnitTests { verify(sessionMock).close(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void testIsClosed() throws Exception { when(reactiveSession.isClosed()).thenReturn(true); @@ -146,10 +122,7 @@ public class DefaultBridgedReactiveSessionUnitTests { verify(sessionMock).isClosed(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void testGetCluster() throws Exception { Cluster clusterMock = mock(Cluster.class); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/QueryOptionsUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/QueryOptionsUnitTests.java index 632e79cf1..a1b8d3307 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/QueryOptionsUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/QueryOptionsUnitTests.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. @@ -33,10 +33,7 @@ import com.datastax.driver.core.policies.LoggingRetryPolicy; */ public class QueryOptionsUnitTests { - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void buildQueryOptions() { QueryOptions queryOptions = QueryOptions.builder() // @@ -56,10 +53,7 @@ public class QueryOptionsUnitTests { assertThat(queryOptions.getTracing()).isTrue(); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void buildQueryOptionsWithDriverRetryPolicy() { QueryOptions writeOptions = QueryOptions.builder() // @@ -70,10 +64,7 @@ public class QueryOptionsUnitTests { assertThat(writeOptions.getDriverRetryPolicy()).isInstanceOf(LoggingRetryPolicy.class); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void buildQueryOptionsWithRetryPolicy() { QueryOptions writeOptions = QueryOptions.builder() // @@ -84,26 +75,17 @@ public class QueryOptionsUnitTests { assertThat(writeOptions.getDriverRetryPolicy()).isNull(); } - /** - * @see DATACASS-202 - */ - @Test(expected = IllegalStateException.class) + @Test(expected = IllegalStateException.class) // DATACASS-202 public void builderShouldRejectSettingOurAndDriverRetryPolicy() { QueryOptions.builder().retryPolicy(RetryPolicy.DEFAULT).retryPolicy(FallthroughRetryPolicy.INSTANCE); } - /** - * @see DATACASS-202 - */ - @Test(expected = IllegalStateException.class) + @Test(expected = IllegalStateException.class) // DATACASS-202 public void builderShouldRejectSettingDriverAndOurRetryPolicy() { QueryOptions.builder().retryPolicy(FallthroughRetryPolicy.INSTANCE).retryPolicy(RetryPolicy.DEFAULT); } - /** - * @see DATACASS-202 - */ - @Test(expected = IllegalStateException.class) + @Test(expected = IllegalStateException.class) // DATACASS-202 public void shouldRejectSettingOurAndDriverRetryPolicy() { QueryOptions queryOptions = new QueryOptions(); @@ -111,10 +93,7 @@ public class QueryOptionsUnitTests { queryOptions.setRetryPolicy(FallthroughRetryPolicy.INSTANCE); } - /** - * @see DATACASS-202 - */ - @Test(expected = IllegalStateException.class) + @Test(expected = IllegalStateException.class) // DATACASS-202 public void shouldRejectSettingDriverAndOurRetryPolicy() { QueryOptions queryOptions = new QueryOptions(); @@ -122,10 +101,7 @@ public class QueryOptionsUnitTests { queryOptions.setRetryPolicy(RetryPolicy.DEFAULT); } - /** - * @see DATACASS-202 - */ - @Test(expected = IllegalStateException.class) + @Test(expected = IllegalStateException.class) // DATACASS-202 public void shouldRejectSettingOurAndDriverConsistencyLevel() { QueryOptions queryOptions = new QueryOptions(); @@ -133,10 +109,7 @@ public class QueryOptionsUnitTests { queryOptions.setConsistencyLevel(ConsistencyLevel.ANY); } - /** - * @see DATACASS-202 - */ - @Test(expected = IllegalStateException.class) + @Test(expected = IllegalStateException.class) // DATACASS-202 public void shouldRejectSettingDriverAndOurConsistencyLevel() { QueryOptions queryOptions = new QueryOptions(); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/QueryOptionsUtilUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/QueryOptionsUtilUnitTests.java index e84b2963d..5ea20f084 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/QueryOptionsUtilUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/QueryOptionsUtilUnitTests.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. @@ -54,10 +54,7 @@ public class QueryOptionsUtilUnitTests { @Mock Statement mockStatement; @Mock Update mockUpdate; - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addPreparedStatementOptionsShouldAddDriverQueryOptions() { QueryOptions queryOptions = QueryOptions.builder() // @@ -71,10 +68,7 @@ public class QueryOptionsUtilUnitTests { verify(mockPreparedStatement).setRetryPolicy(FallthroughRetryPolicy.INSTANCE); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addPreparedStatementOptionsShouldAddOurQueryOptions() { QueryOptions queryOptions = QueryOptions.builder().retryPolicy(RetryPolicy.FALLTHROUGH).build(); @@ -87,10 +81,7 @@ public class QueryOptionsUtilUnitTests { verify(mockPreparedStatement).setConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addStatementQueryOptionsShouldAddDriverQueryOptions() { QueryOptions queryOptions = QueryOptions.builder().consistencyLevel(ConsistencyLevel.EACH_QUORUM) // @@ -103,10 +94,7 @@ public class QueryOptionsUtilUnitTests { verify(mockStatement).setRetryPolicy(FallthroughRetryPolicy.INSTANCE); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addStatementQueryOptionsShouldAddOurQueryOptions() { QueryOptions queryOptions = QueryOptions.builder().retryPolicy(RetryPolicy.FALLTHROUGH).build(); @@ -119,10 +107,7 @@ public class QueryOptionsUtilUnitTests { verify(mockStatement).setConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addStatementQueryOptionsShouldNotAddOptions() { QueryOptions queryOptions = QueryOptions.builder().build(); @@ -132,10 +117,7 @@ public class QueryOptionsUtilUnitTests { verifyZeroInteractions(mockStatement); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addStatementQueryOptionsShouldAddGenericQueryOptions() { QueryOptions queryOptions = QueryOptions.builder() // @@ -151,10 +133,7 @@ public class QueryOptionsUtilUnitTests { verify(mockStatement).enableTracing(); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addInsertWriteOptionsShouldAddDriverQueryOptions() { WriteOptions writeOptions = WriteOptions.builder() // @@ -172,10 +151,7 @@ public class QueryOptionsUtilUnitTests { verify(mockInsert).using(Mockito.any(Using.class)); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addUpdateWriteOptionsShouldAddDriverQueryOptions() { WriteOptions writeOptions = WriteOptions.builder() // diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/ReactiveCqlTemplateIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/ReactiveCqlTemplateIntegrationTests.java index 791fc96b6..995137b54 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/ReactiveCqlTemplateIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/ReactiveCqlTemplateIntegrationTests.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. @@ -17,6 +17,8 @@ package org.springframework.cassandra.core; import static org.assertj.core.api.Assertions.*; +import reactor.core.scheduler.Schedulers; + import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; @@ -26,8 +28,6 @@ import org.springframework.cassandra.test.integration.AbstractKeyspaceCreatingIn import com.datastax.driver.core.querybuilder.QueryBuilder; -import reactor.core.scheduler.Schedulers; - /** * Integration tests for {@link ReactiveCqlTemplate}. * @@ -55,10 +55,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin template = new ReactiveCqlTemplate(new DefaultReactiveSessionFactory(reactiveSession)); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeShouldRemoveRecords() throws Exception { template.execute("DELETE FROM user WHERE id = 'WHITE'").block(); @@ -66,10 +63,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin assertThat(getSession().execute("SELECT * FROM user").one()).isNull(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectShouldReturnFirstColumn() throws Exception { String id = template.queryForObject("SELECT id FROM user;", String.class).block(); @@ -77,10 +71,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin assertThat(id).isEqualTo("WHITE"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectShouldReturnMap() throws Exception { Map map = template.queryForMap("SELECT * FROM user;").block(); @@ -88,10 +79,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin assertThat(map).containsEntry("id", "WHITE").containsEntry("username", "Walter"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeStatementShouldRemoveRecords() throws Exception { template.execute(QueryBuilder.delete().from("user").where(QueryBuilder.eq("id", "WHITE"))).block(); @@ -99,10 +87,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin assertThat(getSession().execute("SELECT * FROM user").one()).isNull(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectStatementShouldReturnFirstColumn() throws Exception { String id = template.queryForObject(QueryBuilder.select("id").from("user"), String.class).block(); @@ -110,10 +95,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin assertThat(id).isEqualTo("WHITE"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectStatementShouldReturnMap() throws Exception { Map map = template.queryForMap(QueryBuilder.select().from("user")).block(); @@ -121,10 +103,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin assertThat(map).containsEntry("id", "WHITE").containsEntry("username", "Walter"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeWithArgsShouldRemoveRecords() throws Exception { template.execute("DELETE FROM user WHERE id = ?", "WHITE").block(); @@ -132,10 +111,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin assertThat(getSession().execute("SELECT * FROM user").one()).isNull(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectWithArgsShouldReturnFirstColumn() throws Exception { String id = template.queryForObject("SELECT id FROM user WHERE id = ?;", String.class, "WHITE").block(); @@ -143,10 +119,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin assertThat(id).isEqualTo("WHITE"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectWithArgsShouldReturnMap() throws Exception { Map map = template.queryForMap("SELECT * FROM user WHERE id = ?;", "WHITE").block(); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/ReactiveCqlTemplateUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/ReactiveCqlTemplateUnitTests.java index 31255f1ab..07e83c900 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/ReactiveCqlTemplateUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/ReactiveCqlTemplateUnitTests.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. @@ -18,6 +18,9 @@ package org.springframework.cassandra.core; import static org.assertj.core.api.Assertions.*; import static org.mockito.Mockito.*; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + import java.util.Collections; import java.util.List; import java.util.function.Consumer; @@ -43,9 +46,6 @@ import com.datastax.driver.core.exceptions.InvalidQueryException; import com.datastax.driver.core.exceptions.NoHostAvailableException; import com.datastax.driver.core.policies.DowngradingConsistencyRetryPolicy; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - /** * Unit tests for {@link ReactiveCqlTemplate}. * @@ -75,10 +75,7 @@ public class ReactiveCqlTemplateUnitTests { // Tests dealing with a plain org.springframework.cassandra.core.ReactiveSession // ------------------------------------------------------------------------- - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeCallbackShouldExecuteDeferred() { Flux flux = template.execute((ReactiveSessionCallback) session -> { @@ -91,10 +88,7 @@ public class ReactiveCqlTemplateUnitTests { verify(session).close(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeCallbackShouldTranslateExceptions() { Flux flux = template.execute((ReactiveSessionCallback) session -> { @@ -110,10 +104,7 @@ public class ReactiveCqlTemplateUnitTests { } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeCqlShouldExecuteDeferred() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -125,10 +116,7 @@ public class ReactiveCqlTemplateUnitTests { verify(session).execute(any(Statement.class)); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeCqlShouldTranslateExceptions() { when(session.execute(any(Statement.class))).thenThrow(new NoHostAvailableException(Collections.emptyMap())); @@ -148,10 +136,7 @@ public class ReactiveCqlTemplateUnitTests { // Tests dealing with static CQL // ------------------------------------------------------------------------- - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeCqlShouldCallExecution() { doTestStrings(null, null, null, reactiveCqlTemplate -> { @@ -162,10 +147,7 @@ public class ReactiveCqlTemplateUnitTests { }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeCqlWithArgumentsShouldCallExecution() { doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, reactiveCqlTemplate -> { @@ -176,10 +158,7 @@ public class ReactiveCqlTemplateUnitTests { }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForResultSetShouldCallExecution() { doTestStrings(null, null, null, reactiveCqlTemplate -> { @@ -193,10 +172,7 @@ public class ReactiveCqlTemplateUnitTests { }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryWithResultSetExtractorShouldCallExecution() { doTestStrings(null, null, null, reactiveCqlTemplate -> { @@ -210,10 +186,7 @@ public class ReactiveCqlTemplateUnitTests { }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryWithResultSetExtractorWithArgumentsShouldCallExecution() { doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, reactiveCqlTemplate -> { @@ -227,10 +200,7 @@ public class ReactiveCqlTemplateUnitTests { }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryCqlShouldExecuteDeferred() { when(reactiveResultSet.wasApplied()).thenReturn(true); @@ -243,10 +213,7 @@ public class ReactiveCqlTemplateUnitTests { verify(session).execute(any(Statement.class)); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryCqlShouldTranslateExceptions() { when(session.execute(any(Statement.class))).thenThrow(new NoHostAvailableException(Collections.emptyMap())); @@ -262,10 +229,7 @@ public class ReactiveCqlTemplateUnitTests { } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectCqlShouldBeEmpty() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -275,10 +239,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.hasElement().block()).isFalse(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectCqlShouldReturnRecord() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -288,10 +249,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.block()).isEqualTo("OK"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectCqlShouldReturnNullValue() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -301,10 +259,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.hasElement().block()).isFalse(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectCqlShouldFailReturningManyRecords() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -321,10 +276,7 @@ public class ReactiveCqlTemplateUnitTests { } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectCqlWithTypeShouldReturnRecord() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -338,10 +290,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.block()).isEqualTo("OK"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForFluxCqlWithTypeShouldReturnRecord() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -355,10 +304,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(flux.collectList().block()).contains("OK", "NOT OK"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForRowsCqlReturnRows() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -369,10 +315,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(flux.collectList().block()).hasSize(2).contains(row); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeCqlShouldReturnWasApplied() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -383,10 +326,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.block()).isTrue(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeCqlPublisherShouldReturnWasApplied() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -403,10 +343,7 @@ public class ReactiveCqlTemplateUnitTests { // Tests dealing with com.datastax.driver.core.Statement // ------------------------------------------------------------------------- - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeStatementShouldCallExecution() { doTestStrings(null, null, null, reactiveCqlTemplate -> { @@ -417,10 +354,7 @@ public class ReactiveCqlTemplateUnitTests { }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeStatementWithArgumentsShouldCallExecution() { doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, reactiveCqlTemplate -> { @@ -431,10 +365,7 @@ public class ReactiveCqlTemplateUnitTests { }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForResultStatementSetShouldCallExecution() { doTestStrings(null, null, null, reactiveCqlTemplate -> { @@ -448,10 +379,7 @@ public class ReactiveCqlTemplateUnitTests { }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryWithResultSetStatementExtractorShouldCallExecution() { doTestStrings(null, null, null, reactiveCqlTemplate -> { @@ -466,10 +394,7 @@ public class ReactiveCqlTemplateUnitTests { }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryWithResultSetStatementExtractorWithArgumentsShouldCallExecution() { doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, reactiveCqlTemplate -> { @@ -484,10 +409,7 @@ public class ReactiveCqlTemplateUnitTests { }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryStatementShouldExecuteDeferred() { when(reactiveResultSet.wasApplied()).thenReturn(true); @@ -501,10 +423,7 @@ public class ReactiveCqlTemplateUnitTests { verify(session).execute(any(Statement.class)); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryStatementShouldTranslateExceptions() { when(session.execute(any(Statement.class))).thenThrow(new NoHostAvailableException(Collections.emptyMap())); @@ -521,10 +440,7 @@ public class ReactiveCqlTemplateUnitTests { } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectStatementShouldBeEmpty() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -534,10 +450,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.hasElement().block()).isFalse(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectStatementShouldReturnRecord() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -547,10 +460,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.block()).isEqualTo("OK"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectStatementShouldReturnNullValue() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -560,10 +470,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.hasElement().block()).isFalse(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectStatementShouldFailReturningManyRecords() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -580,10 +487,7 @@ public class ReactiveCqlTemplateUnitTests { } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectStatementWithTypeShouldReturnRecord() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -597,10 +501,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.block()).isEqualTo("OK"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForFluxStatementWithTypeShouldReturnRecord() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -614,10 +515,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(flux.collectList().block()).contains("OK", "NOT OK"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForRowsStatementReturnRows() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -628,10 +526,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(flux.collectList().block()).hasSize(2).contains(row); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executeStatementShouldReturnWasApplied() { when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet)); @@ -646,10 +541,7 @@ public class ReactiveCqlTemplateUnitTests { // Methods dealing with prepared statements // ------------------------------------------------------------------------- - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryPreparedStatementWithCallbackShouldCallExecution() { doTestStrings(null, null, null, reactiveCqlTemplate -> { @@ -665,10 +557,7 @@ public class ReactiveCqlTemplateUnitTests { }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executePreparedStatementWithCallbackShouldCallExecution() { doTestStrings(null, null, null, reactiveCqlTemplate -> { @@ -681,10 +570,7 @@ public class ReactiveCqlTemplateUnitTests { }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executePreparedStatementCallbackShouldExecuteDeferred() { when(session.prepare(anyString())).thenReturn(Mono.just(preparedStatement)); @@ -701,10 +587,7 @@ public class ReactiveCqlTemplateUnitTests { verify(session).execute(boundStatement); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executePreparedStatementCreatorShouldExecuteDeferred() { when(session.execute(boundStatement)).thenReturn(Mono.just(reactiveResultSet)); @@ -718,10 +601,7 @@ public class ReactiveCqlTemplateUnitTests { verify(session).execute(boundStatement); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executePreparedStatementCreatorShouldTranslateStatementCreationExceptions() { when(session.execute(boundStatement)).thenReturn(Mono.just(reactiveResultSet)); @@ -740,10 +620,7 @@ public class ReactiveCqlTemplateUnitTests { } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void executePreparedStatementCreatorShouldTranslateStatementCallbackExceptions() { when(session.execute(boundStatement)).thenReturn(Mono.just(reactiveResultSet)); @@ -762,10 +639,7 @@ public class ReactiveCqlTemplateUnitTests { } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryPreparedStatementCreatorShouldReturnResult() { when(session.prepare(anyString())).thenReturn(Mono.just(preparedStatement)); @@ -780,10 +654,7 @@ public class ReactiveCqlTemplateUnitTests { verify(preparedStatement).bind(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryPreparedStatementCreatorAndBinderShouldReturnResult() { when(session.prepare(anyString())).thenReturn(Mono.just(preparedStatement)); @@ -801,10 +672,7 @@ public class ReactiveCqlTemplateUnitTests { verify(preparedStatement).bind("a", "b"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryPreparedStatementCreatorAndBinderAndMapperShouldReturnResult() { when(session.prepare(anyString())).thenReturn(Mono.just(preparedStatement)); @@ -822,10 +690,7 @@ public class ReactiveCqlTemplateUnitTests { verify(preparedStatement).bind("a", "b"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectPreparedStatementShouldBeEmpty() { when(session.prepare("SELECT * FROM user WHERE username = ?")).thenReturn(Mono.just(preparedStatement)); @@ -838,10 +703,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.hasElement().block()).isFalse(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectPreparedStatementShouldReturnRecord() { when(session.prepare("SELECT * FROM user WHERE username = ?")).thenReturn(Mono.just(preparedStatement)); @@ -854,10 +716,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.block()).isEqualTo("OK"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectPreparedStatementShouldFailReturningManyRecords() { when(session.prepare("SELECT * FROM user WHERE username = ?")).thenReturn(Mono.just(preparedStatement)); @@ -876,10 +735,7 @@ public class ReactiveCqlTemplateUnitTests { } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForObjectPreparedStatementWithTypeShouldReturnRecord() { when(session.prepare("SELECT * FROM user WHERE username = ?")).thenReturn(Mono.just(preparedStatement)); @@ -895,10 +751,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.block()).isEqualTo("OK"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForFluxPreparedStatementWithTypeShouldReturnRecord() { when(session.prepare("SELECT * FROM user WHERE username = ?")).thenReturn(Mono.just(preparedStatement)); @@ -914,10 +767,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(flux.collectList().block()).contains("OK", "NOT OK"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void queryForRowsPreparedStatementReturnRows() { when(session.prepare("SELECT * FROM user WHERE username = ?")).thenReturn(Mono.just(preparedStatement)); @@ -930,10 +780,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(flux.collectList().block()).hasSize(2).contains(row); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void updatePreparedStatementShouldReturnApplied() { when(session.prepare("UPDATE user SET username = ?")).thenReturn(Mono.just(preparedStatement)); @@ -946,10 +793,7 @@ public class ReactiveCqlTemplateUnitTests { assertThat(mono.block()).isTrue(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void updatePreparedStatementArgsPublisherShouldReturnApplied() { when(session.prepare("UPDATE user SET username = ?")).thenReturn(Mono.just(preparedStatement)); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/SingleColumnRowMapperUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/SingleColumnRowMapperUnitTests.java index c22e56eee..c177ad54e 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/SingleColumnRowMapperUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/SingleColumnRowMapperUnitTests.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. @@ -49,10 +49,7 @@ public class SingleColumnRowMapperUnitTests { when(row.getColumnDefinitions()).thenReturn(columnDefinitions); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void getColumnValueWithType() { when(row.getDouble(2)).thenReturn(42d); @@ -62,10 +59,7 @@ public class SingleColumnRowMapperUnitTests { assertThat(rowMapper.getColumnValue(row, 2, Number.class)).isEqualTo(42d); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void getColumnValue() { when(row.getObject(2)).thenReturn(42d); @@ -75,10 +69,7 @@ public class SingleColumnRowMapperUnitTests { assertThat(rowMapper.getColumnValue(row, 2)).isEqualTo(42d); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void convertValueToRequiredTypeForNumber() { rowMapper = new SingleColumnRowMapper(); @@ -88,10 +79,7 @@ public class SingleColumnRowMapperUnitTests { assertThat(rowMapper.convertValueToRequiredType(1234.2, Double.class)).isEqualTo(1234.2); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void convertValueToRequiredTypeForString() { rowMapper = new SingleColumnRowMapper(); @@ -100,10 +88,7 @@ public class SingleColumnRowMapperUnitTests { assertThat(rowMapper.convertValueToRequiredType("1234.2", Double.class)).isEqualTo(1234.2); } - /** - * @see DATACASS-335 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-335 public void convertValueToRequiredTypeShouldFail() { rowMapper = new SingleColumnRowMapper<>(); @@ -111,10 +96,7 @@ public class SingleColumnRowMapperUnitTests { rowMapper.convertValueToRequiredType("1234", Object.class); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void mapRowSingleColumn() { when(columnDefinitions.size()).thenReturn(1); @@ -125,10 +107,7 @@ public class SingleColumnRowMapperUnitTests { assertThat(rowMapper.mapRow(row, 2)).isEqualTo(42); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void mapRowSingleColumnNullValue() { when(columnDefinitions.size()).thenReturn(1); @@ -139,10 +118,7 @@ public class SingleColumnRowMapperUnitTests { assertThat(rowMapper.mapRow(row, 2)).isNull(); } - /** - * @see DATACASS-335 - */ - @Test(expected = TypeMismatchDataAccessException.class) + @Test(expected = TypeMismatchDataAccessException.class) // DATACASS-335 public void mapRowSingleColumnWrongType() { when(columnDefinitions.size()).thenReturn(1); @@ -153,10 +129,7 @@ public class SingleColumnRowMapperUnitTests { rowMapper.mapRow(row, 2); } - /** - * @see DATACASS-335 - */ - @Test(expected = IncorrectResultSetColumnCountException.class) + @Test(expected = IncorrectResultSetColumnCountException.class) // DATACASS-335 public void tooManyColumns() { when(columnDefinitions.size()).thenReturn(2); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/WriteOptionsUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/WriteOptionsUnitTests.java index 06d74d3c5..e58b01d23 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/WriteOptionsUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/WriteOptionsUnitTests.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. @@ -30,10 +30,7 @@ import com.datastax.driver.core.policies.FallthroughRetryPolicy; */ public class WriteOptionsUnitTests { - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void buildWriteOptions() { WriteOptions writeOptions = WriteOptions.builder() // @@ -54,10 +51,7 @@ public class WriteOptionsUnitTests { assertThat(writeOptions.getTracing()).isTrue(); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void buildReadTimeoutOptionsWriteOptions() { WriteOptions writeOptions = WriteOptions.builder().readTimeout(1, TimeUnit.MINUTES).build(); @@ -67,10 +61,7 @@ public class WriteOptionsUnitTests { assertThat(writeOptions.getTracing()).isNull(); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void buildQueryOptionsWithDriverRetryPolicy() { QueryOptions writeOptions = QueryOptions.builder().retryPolicy(FallthroughRetryPolicy.INSTANCE).build(); @@ -79,10 +70,7 @@ public class WriteOptionsUnitTests { assertThat(writeOptions.getDriverRetryPolicy()).isEqualTo(FallthroughRetryPolicy.INSTANCE); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void buildQueryOptionsWithRetryPolicy() { QueryOptions writeOptions = QueryOptions.builder().retryPolicy(RetryPolicy.DOWNGRADING_CONSISTENCY).build(); @@ -91,18 +79,12 @@ public class WriteOptionsUnitTests { assertThat(writeOptions.getDriverRetryPolicy()).isNull(); } - /** - * @see DATACASS-202 - */ - @Test(expected = IllegalStateException.class) + @Test(expected = IllegalStateException.class) // DATACASS-202 public void builderShouldRejectSettingOurAndDriverRetryPolicy() { WriteOptions.builder().retryPolicy(RetryPolicy.DEFAULT).retryPolicy(FallthroughRetryPolicy.INSTANCE); } - /** - * @see DATACASS-202 - */ - @Test(expected = IllegalStateException.class) + @Test(expected = IllegalStateException.class) // DATACASS-202 public void builderShouldRejectSettingDriverAndOurRetryPolicy() { WriteOptions.builder().retryPolicy(FallthroughRetryPolicy.INSTANCE).retryPolicy(RetryPolicy.DEFAULT); } diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/CqlIdentifierUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/CqlIdentifierUnitTests.java index 75ba52efb..e8a5c9422 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/CqlIdentifierUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/CqlIdentifierUnitTests.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractIndexOperationCqlGeneratorTest.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractIndexOperationCqlGeneratorTest.java index b31499892..6e120d299 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractIndexOperationCqlGeneratorTest.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractIndexOperationCqlGeneratorTest.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractKeyspaceOperationCqlGeneratorTest.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractKeyspaceOperationCqlGeneratorTest.java index 9ed3e84a0..ad2587573 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractKeyspaceOperationCqlGeneratorTest.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractKeyspaceOperationCqlGeneratorTest.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractTableOperationCqlGeneratorTest.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractTableOperationCqlGeneratorTest.java index d10b5438e..c2d01a53e 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractTableOperationCqlGeneratorTest.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AbstractTableOperationCqlGeneratorTest.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterKeyspaceCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterKeyspaceCqlGeneratorUnitTests.java index b7cf0a461..37a18e71d 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterKeyspaceCqlGeneratorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterKeyspaceCqlGeneratorUnitTests.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorIntegrationTests.java index ed17c5fc0..c2625ecb7 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorIntegrationTests.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. @@ -37,7 +37,6 @@ import com.datastax.driver.core.TableMetadata; * Integration tests tests for {@link AlterTableCqlGenerator}. * * @author Mark Paluch - * @see DATACASS-192 */ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCreatingIntegrationTest { @@ -48,10 +47,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea session.execute("DROP TABLE IF EXISTS users;"); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableAlterColumnType() { session.execute( @@ -67,10 +63,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea assertThat(column.getType()).isEqualTo(DataType.varint()); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableAlterListColumnType() { session.execute( @@ -86,10 +79,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea assertThat(column.getType()).isEqualTo((DataType) DataType.list(DataType.varchar())); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableAddColumn() { session.execute( @@ -105,10 +95,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea assertThat(column.getType()).isEqualTo(DataType.varchar()); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableAddListColumn() { session.execute("CREATE TABLE users (user_name varchar PRIMARY KEY);"); @@ -123,10 +110,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea assertThat(column.getType()).isEqualTo((DataType) DataType.list(DataType.ascii())); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableDropColumn() { session.execute("CREATE TABLE addamsFamily (name varchar PRIMARY KEY, gender varchar);"); @@ -138,10 +122,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea assertThat(getTableMetadata("addamsfamily").getColumn("gender")).isNull(); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableRenameColumn() { session.execute("CREATE TABLE addamsFamily (name varchar PRIMARY KEY, firstname varchar);"); @@ -154,10 +135,7 @@ public class AlterTableCqlGeneratorIntegrationTests extends AbstractKeyspaceCrea assertThat(getTableMetadata("addamsfamily").getColumn("newname")).isNotNull(); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableAddCaching() { session.execute("CREATE TABLE users (user_name varchar PRIMARY KEY);"); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorUnitTests.java index 948f68d10..0c92ea0d4 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterTableCqlGeneratorUnitTests.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. @@ -37,10 +37,7 @@ import com.datastax.driver.core.DataType; */ public class AlterTableCqlGeneratorUnitTests { - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableAlterColumnType() { AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily").alter("lastKnownLocation", @@ -49,10 +46,7 @@ public class AlterTableCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("ALTER TABLE addamsfamily ALTER lastknownlocation TYPE uuid;"); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableAlterListColumnType() { AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily").alter("lastKnownLocation", @@ -61,10 +55,7 @@ public class AlterTableCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("ALTER TABLE addamsfamily ALTER lastknownlocation TYPE list;"); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableAddColumn() { AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily").add("gravesite", @@ -73,10 +64,7 @@ public class AlterTableCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("ALTER TABLE addamsfamily ADD gravesite varchar;"); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableAddListColumn() { AlterTableSpecification spec = AlterTableSpecification.alterTable("users").add("top_places", @@ -85,10 +73,7 @@ public class AlterTableCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("ALTER TABLE users ADD top_places list;"); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableDropColumn() { AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily").drop("gender"); @@ -96,10 +81,7 @@ public class AlterTableCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("ALTER TABLE addamsfamily DROP gender;"); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableRenameColumn() { AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily").rename("firstname", "lastname"); @@ -107,10 +89,7 @@ public class AlterTableCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("ALTER TABLE addamsfamily RENAME firstname TO lastname;"); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableAddCommentAndTableOption() { AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily") @@ -120,10 +99,7 @@ public class AlterTableCqlGeneratorUnitTests { "ALTER TABLE addamsfamily WITH read_repair_chance = 0.2 AND comment = 'A most excellent and useful table';"); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableAddColumnAndComment() { AlterTableSpecification spec = AlterTableSpecification.alterTable("addamsFamily") @@ -134,10 +110,7 @@ public class AlterTableCqlGeneratorUnitTests { "ALTER TABLE addamsfamily ADD top_places list ADD other list WITH comment = 'A most excellent and useful table';"); } - /** - * @see DATACASS-192 - */ - @Test + @Test // DATACASS-192 public void alterTableAddCaching() { Map cachingMap = new LinkedHashMap(); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterUserTypeCqlGeneratorIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterUserTypeCqlGeneratorIntegrationTests.java index 58e8652ee..55ec530be 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterUserTypeCqlGeneratorIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterUserTypeCqlGeneratorIntegrationTests.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. @@ -38,10 +38,7 @@ public class AlterUserTypeCqlGeneratorIntegrationTests extends AbstractKeyspaceC session.execute("CREATE TYPE address (zip text, state text);"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void alterTypeShouldAddField() { AlterUserTypeSpecification spec = AlterUserTypeSpecification.alterType("address")// @@ -50,10 +47,7 @@ public class AlterUserTypeCqlGeneratorIntegrationTests extends AbstractKeyspaceC session.execute(toCql(spec)); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void alterTypeShouldAlterField() { AlterUserTypeSpecification spec = AlterUserTypeSpecification.alterType("address")// @@ -62,10 +56,7 @@ public class AlterUserTypeCqlGeneratorIntegrationTests extends AbstractKeyspaceC session.execute(toCql(spec)); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void alterTypeShouldRenameField() { AlterUserTypeSpecification spec = AlterUserTypeSpecification.alterType("address")// @@ -74,10 +65,7 @@ public class AlterUserTypeCqlGeneratorIntegrationTests extends AbstractKeyspaceC session.execute(toCql(spec)); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void alterTypeShouldRenameFields() { AlterUserTypeSpecification spec = AlterUserTypeSpecification.alterType("address")// @@ -87,18 +75,12 @@ public class AlterUserTypeCqlGeneratorIntegrationTests extends AbstractKeyspaceC session.execute(toCql(spec)); } - /** - * @see DATACASS-172 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-172 public void generationFailsIfNameIsNotSet() { toCql(AlterUserTypeSpecification.alterType()); } - /** - * @see DATACASS-172 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-172 public void generationFailsWithoutFields() { toCql(AlterUserTypeSpecification.alterType().name("hello")); } diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterUserTypeCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterUserTypeCqlGeneratorUnitTests.java index 8a239e758..bac822b7b 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterUserTypeCqlGeneratorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/AlterUserTypeCqlGeneratorUnitTests.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. @@ -30,10 +30,7 @@ import com.datastax.driver.core.DataType; */ public class AlterUserTypeCqlGeneratorUnitTests { - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void alterTypeShouldAddField() { AlterUserTypeSpecification spec = AlterUserTypeSpecification.alterType("address") // @@ -42,10 +39,7 @@ public class AlterUserTypeCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("ALTER TYPE address ADD zip varchar;"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void alterTypeShouldAlterField() { AlterUserTypeSpecification spec = AlterUserTypeSpecification.alterType("address") // @@ -54,10 +48,7 @@ public class AlterUserTypeCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("ALTER TYPE address ALTER zip TYPE varchar;"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void alterTypeShouldRenameField() { AlterUserTypeSpecification spec = AlterUserTypeSpecification.alterType("address") // @@ -66,10 +57,7 @@ public class AlterUserTypeCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("ALTER TYPE address RENAME zip TO zap;"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void alterTypeShouldRenameFields() { AlterUserTypeSpecification spec = AlterUserTypeSpecification.alterType("address") // @@ -79,18 +67,12 @@ public class AlterUserTypeCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("ALTER TYPE address RENAME zip TO zap AND city TO county;"); } - /** - * @see DATACASS-172 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-172 public void generationFailsIfNameIsNotSet() { toCql(AlterUserTypeSpecification.alterType()); } - /** - * @see DATACASS-172 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-172 public void generationFailsWithoutFields() { toCql(AlterUserTypeSpecification.alterType().name("hello")); } diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateIndexCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateIndexCqlGeneratorUnitTests.java index cbd15a0da..0fde7cde0 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateIndexCqlGeneratorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateIndexCqlGeneratorUnitTests.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateKeyspaceCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateKeyspaceCqlGeneratorUnitTests.java index 0fb0a478b..7377e6c3f 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateKeyspaceCqlGeneratorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateKeyspaceCqlGeneratorUnitTests.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateTableCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateTableCqlGeneratorUnitTests.java index 025f3b987..4b6380eed 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateTableCqlGeneratorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateTableCqlGeneratorUnitTests.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateUserTypeCqlGeneratorIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateUserTypeCqlGeneratorIntegrationTests.java index f49a3084e..02bb14681 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateUserTypeCqlGeneratorIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateUserTypeCqlGeneratorIntegrationTests.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. @@ -15,7 +15,7 @@ */ package org.springframework.cassandra.core.cql.generator; -import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.*; import static org.springframework.cassandra.core.cql.generator.CreateUserTypeCqlGenerator.*; import org.junit.Before; @@ -41,10 +41,7 @@ public class CreateUserTypeCqlGeneratorIntegrationTests extends AbstractKeyspace session.execute("DROP TYPE IF EXISTS address;"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void createUserType() { CreateUserTypeSpecification spec = CreateUserTypeSpecification // @@ -59,10 +56,7 @@ public class CreateUserTypeCqlGeneratorIntegrationTests extends AbstractKeyspace assertThat(address.getFieldNames()).contains("zip", "city"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void createUserTypeIfNotExists() { CreateUserTypeSpecification spec = CreateUserTypeSpecification // @@ -77,10 +71,7 @@ public class CreateUserTypeCqlGeneratorIntegrationTests extends AbstractKeyspace assertThat(address.getFieldNames()).contains("zip", "city"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void createNestedUserType() { CreateUserTypeSpecification addressSpec = CreateUserTypeSpecification // diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateUserTypeCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateUserTypeCqlGeneratorUnitTests.java index a05dbc970..9164ae5f5 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateUserTypeCqlGeneratorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/CreateUserTypeCqlGeneratorUnitTests.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. @@ -30,10 +30,7 @@ import com.datastax.driver.core.DataType; */ public class CreateUserTypeCqlGeneratorUnitTests { - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void createUserType() { CreateUserTypeSpecification spec = CreateUserTypeSpecification // @@ -43,10 +40,7 @@ public class CreateUserTypeCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("CREATE TYPE address (city varchar);"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void createMultiFieldUserType() { CreateUserTypeSpecification spec = CreateUserTypeSpecification // @@ -57,10 +51,7 @@ public class CreateUserTypeCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("CREATE TYPE address (zip ascii, city varchar);"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void createUserTypeIfNotExists() { CreateUserTypeSpecification spec = CreateUserTypeSpecification // @@ -71,18 +62,12 @@ public class CreateUserTypeCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("CREATE TYPE IF NOT EXISTS address (zip ascii, city varchar);"); } - /** - * @see DATACASS-172 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-172 public void generationFailsIfNameIsNotSet() { toCql(CreateUserTypeSpecification.createType()); } - /** - * @see DATACASS-172 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-172 public void generationFailsWithoutFields() { toCql(CreateUserTypeSpecification.createType().name("hello")); } diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropIndexCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropIndexCqlGeneratorUnitTests.java index ca0a353f9..01387bf22 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropIndexCqlGeneratorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropIndexCqlGeneratorUnitTests.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropKeyspaceCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropKeyspaceCqlGeneratorUnitTests.java index fc9806739..f93588b3f 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropKeyspaceCqlGeneratorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropKeyspaceCqlGeneratorUnitTests.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropTableCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropTableCqlGeneratorUnitTests.java index 54a5ebb38..90ca48199 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropTableCqlGeneratorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropTableCqlGeneratorUnitTests.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropUserTypeCqlGeneratorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropUserTypeCqlGeneratorUnitTests.java index ff5568da9..b99b6f5ad 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropUserTypeCqlGeneratorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/cql/generator/DropUserTypeCqlGeneratorUnitTests.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. @@ -15,7 +15,7 @@ */ package org.springframework.cassandra.core.cql.generator; -import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.*; import static org.springframework.cassandra.core.cql.generator.DropUserTypeCqlGenerator.*; import org.junit.Test; @@ -28,10 +28,7 @@ import org.springframework.cassandra.core.keyspace.DropUserTypeSpecification; */ public class DropUserTypeCqlGeneratorUnitTests { - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldDropUserType() { DropUserTypeSpecification spec = DropUserTypeSpecification.dropType("address"); @@ -39,10 +36,7 @@ public class DropUserTypeCqlGeneratorUnitTests { assertThat(toCql(spec)).isEqualTo("DROP TYPE address;"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldDropUserTypeIfExists() { DropUserTypeSpecification spec = DropUserTypeSpecification.dropType("address").ifExists(); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/keyspace/OptionUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/keyspace/OptionUnitTests.java index f0f886de8..72e33d161 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/keyspace/OptionUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/keyspace/OptionUnitTests.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/support/EmptyResultSetUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/support/EmptyResultSetUnitTests.java index 3021e0520..9dd17d426 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/support/EmptyResultSetUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/support/EmptyResultSetUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/core/util/CollectionUtilsUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/util/CollectionUtilsUnitTests.java index 7585e1d7d..61817c713 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/core/util/CollectionUtilsUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/core/util/CollectionUtilsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/support/BeanDefinitionTestUtils.java b/spring-cql/src/test/java/org/springframework/cassandra/support/BeanDefinitionTestUtils.java index 18d519bca..3cd7f6f23 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/support/BeanDefinitionTestUtils.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/support/BeanDefinitionTestUtils.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/support/CassandraAccessorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/support/CassandraAccessorUnitTests.java index 8b2b6ab73..0a66af5a1 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/support/CassandraAccessorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/support/CassandraAccessorUnitTests.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. @@ -49,10 +49,7 @@ public class CassandraAccessorUnitTests { cassandraAccessor = new CassandraAccessor(); } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void afterPropertiesSetWithUnitializedSessionThrowsIllegalStateException() { try { @@ -63,20 +60,14 @@ public class CassandraAccessorUnitTests { } } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void setAndGetExceptionTranslator() { cassandraAccessor.setExceptionTranslator(mockExceptionTranslator); assertThat(cassandraAccessor.getExceptionTranslator()).isSameAs(mockExceptionTranslator); } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void setExceptionTranslatorToNullThrowsIllegalArgumentException() { try { @@ -87,28 +78,19 @@ public class CassandraAccessorUnitTests { } } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void getUninitializedExceptionTranslatorReturnsDefault() { assertThat(cassandraAccessor.getExceptionTranslator()).isEqualTo(cassandraAccessor.exceptionTranslator); } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void setAndGetSession() { cassandraAccessor.setSession(mockSession); assertThat(cassandraAccessor.getSession()).isSameAs(mockSession); } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void setSessionToNullThrowsIllegalArgumentException() { try { @@ -119,10 +101,7 @@ public class CassandraAccessorUnitTests { } } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void getUninitializedSessionThrowsIllegalStateException() { try { diff --git a/spring-cql/src/test/java/org/springframework/cassandra/support/CassandraExceptionTranslatorUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/support/CassandraExceptionTranslatorUnitTests.java index 2f5a5089c..7ad1c8b2c 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/support/CassandraExceptionTranslatorUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/support/CassandraExceptionTranslatorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. @@ -15,8 +15,7 @@ */ package org.springframework.cassandra.support; -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.*; +import static org.assertj.core.api.Assertions.*; import org.junit.Test; import org.springframework.cassandra.support.exception.CassandraInvalidConfigurationInQueryException; @@ -88,10 +87,7 @@ public class CassandraExceptionTranslatorUnitTests { assertThat(dax.getCause()).isEqualTo(cx); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void shouldTranslateWithCqlMessage() { InvalidQueryException cx = new InvalidConfigurationInQueryException(null, "err"); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/support/RandomKeySpaceName.java b/spring-cql/src/test/java/org/springframework/cassandra/support/RandomKeySpaceName.java index 382dbae35..c1e1cb47c 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/support/RandomKeySpaceName.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/support/RandomKeySpaceName.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/AbstractEmbeddedCassandraIntegrationTest.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/AbstractEmbeddedCassandraIntegrationTest.java index 5a13a8833..32bcba044 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/AbstractEmbeddedCassandraIntegrationTest.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/AbstractEmbeddedCassandraIntegrationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/AbstractKeyspaceCreatingIntegrationTest.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/AbstractKeyspaceCreatingIntegrationTest.java index 763b2b463..9e84e74b8 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/AbstractKeyspaceCreatingIntegrationTest.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/AbstractKeyspaceCreatingIntegrationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/CassandraRule.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/CassandraRule.java index 4bbd810ba..6490340d0 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/CassandraRule.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/CassandraRule.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/EmbeddedCassandraServerHelper.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/EmbeddedCassandraServerHelper.java index bf07c4e9e..786403755 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/EmbeddedCassandraServerHelper.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/EmbeddedCassandraServerHelper.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/KeyspaceRule.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/KeyspaceRule.java index 38956c736..fd8138df3 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/KeyspaceRule.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/KeyspaceRule.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/CassandraCqlClusterFactoryBeanIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/CassandraCqlClusterFactoryBeanIntegrationTests.java index 869658e54..8c619110e 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/CassandraCqlClusterFactoryBeanIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/CassandraCqlClusterFactoryBeanIntegrationTests.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/IntegrationTestUtils.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/IntegrationTestUtils.java index bfa0a4522..1e3eb8073 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/IntegrationTestUtils.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/IntegrationTestUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/AbstractIntegrationTest.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/AbstractIntegrationTest.java index f7b066d11..90e4712d1 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/AbstractIntegrationTest.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/AbstractIntegrationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/Config.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/Config.java index 7d8844301..11ad80356 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/Config.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/Config.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/ConfigIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/ConfigIntegrationTests.java index 7a5c150ae..57dbe962c 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/ConfigIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/ConfigIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/CqlTemplateConfigIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/CqlTemplateConfigIntegrationTests.java index d31646062..5d6d956b7 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/CqlTemplateConfigIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/CqlTemplateConfigIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/KeyspaceCreatingJavaConfig.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/KeyspaceCreatingJavaConfig.java index 06d96b182..c4d03ca04 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/KeyspaceCreatingJavaConfig.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/KeyspaceCreatingJavaConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/KeyspaceCreatingJavaConfigIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/KeyspaceCreatingJavaConfigIntegrationTests.java index ef39dd7b0..68517b63e 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/KeyspaceCreatingJavaConfigIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/java/KeyspaceCreatingJavaConfigIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/FullySpecifiedKeyspaceCreatingXmlConfigIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/FullySpecifiedKeyspaceCreatingXmlConfigIntegrationTests.java index 37bb11b67..cac711fb8 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/FullySpecifiedKeyspaceCreatingXmlConfigIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/FullySpecifiedKeyspaceCreatingXmlConfigIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/MinimalKeyspaceCreatingXmlConfigIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/MinimalKeyspaceCreatingXmlConfigIntegrationTests.java index 7fe7ac4ca..84cba5d67 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/MinimalKeyspaceCreatingXmlConfigIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/MinimalKeyspaceCreatingXmlConfigIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/MinimalXmlConfigIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/MinimalXmlConfigIntegrationTests.java index deb343551..d7e4dee7b 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/MinimalXmlConfigIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/MinimalXmlConfigIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/PropertyPlaceholderNamespaceCreatingXmlConfigIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/PropertyPlaceholderNamespaceCreatingXmlConfigIntegrationTests.java index 8261d1c7a..72f0ba164 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/PropertyPlaceholderNamespaceCreatingXmlConfigIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/PropertyPlaceholderNamespaceCreatingXmlConfigIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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 PropertyPlaceholderNamespaceCreatingXmlConfigIntegrationTests assertThat(ops).isNotNull(); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void localAndRemotePoolingOptionsWereConfiguredProperly() { PoolingOptions poolingOptions = cassandraCluster.getConfiguration().getPoolingOptions(); @@ -78,10 +75,7 @@ public class PropertyPlaceholderNamespaceCreatingXmlConfigIntegrationTests assertThat(poolingOptions.getNewConnectionThreshold(HostDistance.REMOTE)).isEqualTo(5); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void socketOptionsWereConfiguredProperly() { SocketOptions socketOptions = cassandraCluster.getConfiguration().getSocketOptions(); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/TestHostStateListener.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/TestHostStateListener.java index 6c767f9d7..0af62b286 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/TestHostStateListener.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/TestHostStateListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/TestLatencyTracker.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/TestLatencyTracker.java index 50b4553d7..e32951d09 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/TestLatencyTracker.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/TestLatencyTracker.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/XmlConfigIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/XmlConfigIntegrationTests.java index 06e95d945..4d2a31273 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/XmlConfigIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/config/xml/XmlConfigIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. @@ -108,10 +108,7 @@ public class XmlConfigIntegrationTests extends AbstractEmbeddedCassandraIntegrat assertThat(((TestClusterBuilderConfigurer) clusterBuilderConfigurer).configureCalled.get()).isTrue(); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void localAndRemotePoolingOptionsWereConfiguredProperly() { PoolingOptions poolingOptions = cluster.getConfiguration().getPoolingOptions(); @@ -130,10 +127,7 @@ public class XmlConfigIntegrationTests extends AbstractEmbeddedCassandraIntegrat assertThat(poolingOptions.getNewConnectionThreshold(HostDistance.REMOTE)).isEqualTo(25); } - /** - * @see DATACASS-298 - */ - @Test + @Test // DATACASS-298 public void socketOptionsWereConfiguredProperly() { SocketOptions socketOptions = cluster.getConfiguration().getSocketOptions(); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/Book.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/Book.java index 403e32e27..73d59cb08 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/Book.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/Book.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/BookListener.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/BookListener.java index e3a8bf9dc..5ee55d496 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/BookListener.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/BookListener.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CqlIndexSpecificationAssertions.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CqlIndexSpecificationAssertions.java index 096fc9e74..33a464950 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CqlIndexSpecificationAssertions.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CqlIndexSpecificationAssertions.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CqlKeyspaceSpecificationAssertions.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CqlKeyspaceSpecificationAssertions.java index d2ea69f0e..78305bff5 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CqlKeyspaceSpecificationAssertions.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CqlKeyspaceSpecificationAssertions.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CqlTableSpecificationAssertions.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CqlTableSpecificationAssertions.java index 029e4305f..7dfb0731f 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CqlTableSpecificationAssertions.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CqlTableSpecificationAssertions.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CreateIndexCqlGeneratorIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CreateIndexCqlGeneratorIntegrationTests.java index 2309d05a9..7d30db877 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CreateIndexCqlGeneratorIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CreateIndexCqlGeneratorIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CreateKeyspaceCqlGeneratorIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CreateKeyspaceCqlGeneratorIntegrationTests.java index 3020c4e7f..41845a5a6 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CreateKeyspaceCqlGeneratorIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CreateKeyspaceCqlGeneratorIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CreateTableCqlGeneratorIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CreateTableCqlGeneratorIntegrationTests.java index 5952e8947..8b18349f8 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CreateTableCqlGeneratorIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/CreateTableCqlGeneratorIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2015 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/IndexLifecycleCqlGeneratorIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/IndexLifecycleCqlGeneratorIntegrationTests.java index e9f579804..09759587b 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/IndexLifecycleCqlGeneratorIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/IndexLifecycleCqlGeneratorIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/TableLifecycleIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/TableLifecycleIntegrationTests.java index f64b4eb09..33dc788e9 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/TableLifecycleIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/TableLifecycleIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/TableOptionsIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/TableOptionsIntegrationTests.java index 174d75390..0d0397f9c 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/TableOptionsIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/cql/generator/TableOptionsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2015 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/AbstractTestJavaConfig.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/AbstractTestJavaConfig.java index a72bcb7eb..d8ae77d2d 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/AbstractTestJavaConfig.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/AbstractTestJavaConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/CallbackSynchronizationSupport.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/CallbackSynchronizationSupport.java index 186ed8cad..6d66633c8 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/CallbackSynchronizationSupport.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/CallbackSynchronizationSupport.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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/CassandraConnectionProperties.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/CassandraConnectionProperties.java index 70455ce96..3585df3f4 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/CassandraConnectionProperties.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/CassandraConnectionProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-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. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/CqlDataSet.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/CqlDataSet.java index 1b6a1b67a..5ed1865e0 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/CqlDataSet.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/CqlDataSet.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. @@ -15,6 +15,8 @@ */ package org.springframework.cassandra.test.integration.support; +import lombok.SneakyThrows; + import java.net.URL; import java.nio.charset.Charset; import java.util.List; @@ -23,8 +25,6 @@ import org.springframework.util.Assert; import com.google.common.io.Resources; -import lombok.SneakyThrows; - /** * An executable CQL data set. The data set can be created from class path resources and execution can be bound to a * particular keyspace. diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/FastShutdownNettyOptions.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/FastShutdownNettyOptions.java index 0dedb3272..dbd4188bb 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/FastShutdownNettyOptions.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/FastShutdownNettyOptions.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. @@ -15,12 +15,12 @@ */ package org.springframework.cassandra.test.integration.support; +import io.netty.channel.EventLoopGroup; + import java.util.concurrent.TimeUnit; import com.datastax.driver.core.NettyOptions; -import io.netty.channel.EventLoopGroup; - /** * {@link NettyOptions} to shutdown a {@link com.datastax.driver.core.Cluster} instance without wait time. * diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/RowMockUtil.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/RowMockUtil.java index 607fde774..5966dd605 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/RowMockUtil.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/RowMockUtil.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/config/CassandraSessionFactoryBeanUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/config/CassandraSessionFactoryBeanUnitTests.java index c55b3b958..38ef08b88 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/config/CassandraSessionFactoryBeanUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/config/CassandraSessionFactoryBeanUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors + * Copyright 2013-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. @@ -18,15 +18,10 @@ package org.springframework.data.cassandra.config; import static org.assertj.core.api.Assertions.*; import static org.mockito.Matchers.anyBoolean; -import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; -import static org.mockito.Matchers.isNull; import static org.mockito.Mockito.*; import static org.springframework.data.cassandra.config.CassandraSessionFactoryBean.*; -import java.util.Collections; -import java.util.Map; - import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -38,15 +33,9 @@ import org.mockito.runners.MockitoJUnitRunner; import org.mockito.stubbing.Answer; import org.springframework.cassandra.core.cql.CqlIdentifier; import org.springframework.data.cassandra.convert.CassandraConverter; -import org.springframework.data.cassandra.core.CassandraAdminOperations; -import org.springframework.data.cassandra.mapping.CassandraMappingContext; -import org.springframework.data.cassandra.mapping.CassandraPersistentEntity; import com.datastax.driver.core.Cluster; -import com.datastax.driver.core.KeyspaceMetadata; -import com.datastax.driver.core.Metadata; import com.datastax.driver.core.Session; -import com.datastax.driver.core.TableMetadata; /** * The CassandraSessionFactoryBeanUnitTests class is a test suite of test cases testing the contract and functionality @@ -54,8 +43,6 @@ import com.datastax.driver.core.TableMetadata; * * @author John Blum * @see org.springframework.data.cassandra.config.CassandraSessionFactoryBean - * @see persistentEntity = converter.getMappingContext() @@ -248,10 +230,7 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring + "VALUES ({zip:'69469',city:'Weinheim',streetlines:['Heckenpfad','14']},null,'1',null);"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldWriteUdtPk() { AddressUserType addressUserType = new AddressUserType(); @@ -269,10 +248,7 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring "INSERT INTO addressbook (id) " + "VALUES ({zip:'69469',city:'Weinheim',streetlines:['Heckenpfad','14']});"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldWriteMappedUdtPk() { CassandraPersistentEntity persistentEntity = converter.getMappingContext() @@ -292,10 +268,7 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring "INSERT INTO addressbook (id) " + "VALUES ({zip:'69469',city:'Weinheim',streetlines:['Heckenpfad','14']});"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldReadUdtWithCustomConversion() { session.execute("INSERT INTO bank (id, currency) " + "VALUES ('1', {currency:'EUR'});"); @@ -307,10 +280,7 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring assertThat(addressBook.getCurrency().getCurrencyCode()).isEqualTo("EUR"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldReadUdtListWithCustomConversion() { session.execute("INSERT INTO bank (id, othercurrencies) " + "VALUES ('1', [{currency:'EUR'}]);"); @@ -321,10 +291,7 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring assertThat(addressBook.getOtherCurrencies()).hasSize(1).contains(Currency.getInstance("EUR")); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldWriteUdtWithCustomConversion() { Bank bank = new Bank(); @@ -333,13 +300,11 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring Insert insert = QueryBuilder.insertInto("bank"); converter.write(bank, insert); - assertThat(insert.toString()).isEqualTo("INSERT INTO bank (currency,id,othercurrencies) VALUES ({currency:'EUR'},null,null);"); + assertThat(insert.toString()) + .isEqualTo("INSERT INTO bank (currency,id,othercurrencies) VALUES ({currency:'EUR'},null,null);"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldWriteUdtUpdateWherePrimaryKeyWithCustomConversion() { Money money = new Money(); @@ -351,10 +316,7 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring assertThat(update.toString()).isEqualTo("UPDATE money WHERE currency={currency:'EUR'};"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldWriteUdtUpdateAssignmentsWithCustomConversion() { MoneyTransfer money = new MoneyTransfer(); @@ -367,10 +329,7 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring assertThat(update.toString()).isEqualTo("UPDATE money SET currency={currency:'EUR'} WHERE id='1';"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldWriteUdtSelectWherePrimaryKeyWithCustomConversion() { Money money = new Money(); @@ -382,10 +341,7 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring assertThat(select.toString()).isEqualTo("SELECT * FROM money WHERE currency={currency:'EUR'};"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldWriteUdtDeleteWherePrimaryKeyWithCustomConversion() { Money money = new Money(); @@ -397,10 +353,7 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring assertThat(delete.toString()).isEqualTo("DELETE FROM money WHERE currency={currency:'EUR'};"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldWriteUdtListWithCustomConversion() { Bank bank = new Bank(); @@ -409,13 +362,11 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring Insert insert = QueryBuilder.insertInto("bank"); converter.write(bank, insert); - assertThat(insert.toString()).isEqualTo("INSERT INTO bank (currency,id,othercurrencies) VALUES (null,null,[{currency:'EUR'}]);"); + assertThat(insert.toString()) + .isEqualTo("INSERT INTO bank (currency,id,othercurrencies) VALUES (null,null,[{currency:'EUR'}]);"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldReadNestedUdt() { session.execute("INSERT INTO car (id, engine) VALUES ('1', {manufacturer: {name:'a good one'}});"); @@ -428,10 +379,7 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring assertThat(car.getEngine().getManufacturer().getName()).isEqualTo("a good one"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldWriteNestedUdt() { session.execute("INSERT INTO car (id, engine) VALUES ('1', {manufacturer: {name:'a good one'}});"); @@ -449,7 +397,8 @@ public class MappingCassandraConverterUDTIntegrationTests extends AbstractSpring Insert insert = QueryBuilder.insertInto("car"); converter.write(car, insert); - assertThat(insert.toString()).isEqualTo("INSERT INTO car (engine,id) VALUES ({manufacturer:{name:'a good one'}},'1');"); + assertThat(insert.toString()) + .isEqualTo("INSERT INTO car (engine,id) VALUES ({manufacturer:{name:'a good one'}},'1');"); } @Table diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/convert/MappingCassandraConverterUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/convert/MappingCassandraConverterUnitTests.java index 60c79ffd1..f3687619f 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/convert/MappingCassandraConverterUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/convert/MappingCassandraConverterUnitTests.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. @@ -40,20 +40,6 @@ import java.util.Map; import java.util.Set; import java.util.UUID; -import com.datastax.driver.core.DataType; -import com.datastax.driver.core.DataType.Name; -import com.datastax.driver.core.LocalDate; -import com.datastax.driver.core.Row; -import com.datastax.driver.core.querybuilder.Assignment; -import com.datastax.driver.core.querybuilder.BuiltStatement; -import com.datastax.driver.core.querybuilder.Clause; -import com.datastax.driver.core.querybuilder.Delete; -import com.datastax.driver.core.querybuilder.Delete.Where; -import com.datastax.driver.core.querybuilder.Insert; -import com.datastax.driver.core.querybuilder.QueryBuilder; -import com.datastax.driver.core.querybuilder.Update; -import com.datastax.driver.core.querybuilder.Update.Assignments; - import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -81,6 +67,20 @@ import org.springframework.data.cassandra.mapping.Table; import org.springframework.data.util.Version; import org.springframework.test.util.ReflectionTestUtils; +import com.datastax.driver.core.DataType; +import com.datastax.driver.core.DataType.Name; +import com.datastax.driver.core.LocalDate; +import com.datastax.driver.core.Row; +import com.datastax.driver.core.querybuilder.Assignment; +import com.datastax.driver.core.querybuilder.BuiltStatement; +import com.datastax.driver.core.querybuilder.Clause; +import com.datastax.driver.core.querybuilder.Delete; +import com.datastax.driver.core.querybuilder.Delete.Where; +import com.datastax.driver.core.querybuilder.Insert; +import com.datastax.driver.core.querybuilder.QueryBuilder; +import com.datastax.driver.core.querybuilder.Update; +import com.datastax.driver.core.querybuilder.Update.Assignments; + /** * Unit tests for {@link MappingCassandraConverter}. * @@ -109,10 +109,7 @@ public class MappingCassandraConverterUnitTests { mappingCassandraConverter.afterPropertiesSet(); } - /** - * @see DATACASS-260 - */ - @Test + @Test // DATACASS-260 public void insertEnumShouldMapToString() { WithEnumColumns withEnumColumns = new WithEnumColumns(); @@ -126,10 +123,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getValues(insert)).contains("MINT"); } - /** - * @see DATACASS-260 - */ - @Test + @Test // DATACASS-260 public void insertEnumDoesNotMapToOrdinalBeforeSpring43() { assumeTrue(Version.parse(SpringVersion.getVersion()).isLessThan(VERSION_4_3)); @@ -144,10 +138,7 @@ public class MappingCassandraConverterUnitTests { mappingCassandraConverter.write(unsupportedEnumToOrdinalMapping, insert); } - /** - * @see DATACASS-255 - */ - @Test + @Test // DATACASS-255 public void insertEnumMapsToOrdinalWithSpring43AndHiger() { assumeTrue(Version.parse(SpringVersion.getVersion()).isGreaterThanOrEqualTo(VERSION_4_3)); @@ -162,10 +153,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getValues(insert)).contains((Object) Integer.valueOf(Condition.USED.ordinal())); } - /** - * @see DATACASS-260 - */ - @Test + @Test // DATACASS-260 public void insertEnumAsPrimaryKeyShouldMapToString() { EnumPrimaryKey key = new EnumPrimaryKey(); @@ -178,10 +166,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getValues(insert)).contains((Object) "MINT"); } - /** - * @see DATACASS-260 - */ - @Test + @Test // DATACASS-260 public void insertEnumInCompositePrimaryKeyShouldMapToString() { EnumCompositePrimaryKey key = new EnumCompositePrimaryKey(); @@ -197,10 +182,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getValues(insert)).contains((Object) "MINT"); } - /** - * @see DATACASS-260 - */ - @Test + @Test // DATACASS-260 public void updateEnumShouldMapToString() { WithEnumColumns withEnumColumns = new WithEnumColumns(); @@ -213,10 +195,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getAssignmentValues(update)).contains((Object) "MINT"); } - /** - * @see DATACASS-260 - */ - @Test + @Test // DATACASS-260 public void updateEnumAsPrimaryKeyShouldMapToString() { EnumPrimaryKey key = new EnumPrimaryKey(); @@ -229,10 +208,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWhereValues(update)).contains((Object) "MINT"); } - /** - * @see DATACASS-260 - */ - @Test + @Test // DATACASS-260 public void updateEnumInCompositePrimaryKeyShouldMapToString() { EnumCompositePrimaryKey key = new EnumCompositePrimaryKey(); @@ -248,10 +224,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWhereValues(update)).contains((Object) "MINT"); } - /** - * @see DATACASS-260 - */ - @Test + @Test // DATACASS-260 public void whereEnumAsPrimaryKeyShouldMapToString() { EnumPrimaryKey key = new EnumPrimaryKey(); @@ -264,10 +237,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWhereValues(where)).contains((Object) "MINT"); } - /** - * @see DATACASS-260 - */ - @Test + @Test // DATACASS-260 public void whereEnumInCompositePrimaryKeyShouldMapToString() { EnumCompositePrimaryKey key = new EnumCompositePrimaryKey(); @@ -283,10 +253,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWhereValues(where)).contains((Object) "MINT"); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadStringCorrectly() { when(rowMock.getString(0)).thenReturn("foo"); @@ -296,10 +263,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result).isEqualTo("foo"); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadIntegerCorrectly() { when(rowMock.getObject(0)).thenReturn(2); @@ -309,10 +273,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result).isEqualTo(2); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadLongCorrectly() { when(rowMock.getObject(0)).thenReturn(2); @@ -322,10 +283,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result).isEqualTo(2L); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadDoubleCorrectly() { when(rowMock.getObject(0)).thenReturn(2D); @@ -335,10 +293,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result).isEqualTo(2D); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadFloatCorrectly() { when(rowMock.getObject(0)).thenReturn(2F); @@ -348,10 +303,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result).isEqualTo(2F); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadBigIntegerCorrectly() { when(rowMock.getObject(0)).thenReturn(BigInteger.valueOf(2)); @@ -361,10 +313,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result).isEqualTo(BigInteger.valueOf(2)); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadBigDecimalCorrectly() { when(rowMock.getObject(0)).thenReturn(BigDecimal.valueOf(2)); @@ -374,10 +323,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result).isEqualTo(BigDecimal.valueOf(2)); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadUUIDCorrectly() { UUID uuid = UUID.randomUUID(); @@ -389,10 +335,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result).isEqualTo(uuid); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadInetAddressCorrectly() throws UnknownHostException { InetAddress localHost = InetAddress.getLocalHost(); @@ -404,11 +347,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result).isEqualTo(localHost); } - /** - * @see DATACASS-280 - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-280, DATACASS-271 public void shouldReadTimestampCorrectly() { Date date = new Date(1); @@ -420,10 +359,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result).isEqualTo(date); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReadDateCorrectly() { LocalDate date = LocalDate.fromDaysSinceEpoch(1234); @@ -435,10 +371,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result).isEqualTo(date); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadBooleanCorrectly() { when(rowMock.getBool(0)).thenReturn(true); @@ -448,10 +381,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result).isEqualTo(true); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadLocalDateCorrectly() { LocalDateTime now = LocalDateTime.now(); @@ -467,10 +397,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result.localDate.getMonthValue()).isEqualTo(now.getMonthValue()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldCreateInsertWithLocalDateCorrectly() { java.time.LocalDate now = java.time.LocalDate.now(); @@ -486,10 +413,7 @@ public class MappingCassandraConverterUnitTests { .contains(LocalDate.fromYearMonthDay(now.getYear(), now.getMonthValue(), now.getDayOfMonth())); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldCreateUpdateWithLocalDateCorrectly() { java.time.LocalDate now = java.time.LocalDate.now(); @@ -505,10 +429,7 @@ public class MappingCassandraConverterUnitTests { .contains(LocalDate.fromYearMonthDay(now.getYear(), now.getMonthValue(), now.getDayOfMonth())); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldCreateInsertWithLocalDateListUsingCassandraDate() { java.time.LocalDate now = java.time.LocalDate.now(); @@ -527,10 +448,7 @@ public class MappingCassandraConverterUnitTests { assertThat(dates).contains(LocalDate.fromYearMonthDay(2010, 7, 4)); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldCreateInsertWithLocalDateSetUsingCassandraDate() { java.time.LocalDate now = java.time.LocalDate.now(); @@ -549,10 +467,7 @@ public class MappingCassandraConverterUnitTests { assertThat(dates).contains(LocalDate.fromYearMonthDay(2010, 7, 4)); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadLocalDateTimeUsingCassandraDateCorrectly() { Row rowMock = RowMockUtil.newRowMock(column("id", "my-id", DataType.ascii()), @@ -567,10 +482,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result.localDate.getDayOfMonth()).isEqualTo(4); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldCreateInsertWithLocalDateUsingCassandraDateCorrectly() { TypeWithLocalDateMappedToDate typeWithLocalDate = new TypeWithLocalDateMappedToDate(); @@ -583,10 +495,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getValues(insert).contains(LocalDate.fromYearMonthDay(2010, 7, 4))).isTrue(); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldCreateUpdateWithLocalDateUsingCassandraDateCorrectly() { TypeWithLocalDateMappedToDate typeWithLocalDate = new TypeWithLocalDateMappedToDate(); @@ -599,10 +508,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getAssignmentValues(update)).contains(LocalDate.fromYearMonthDay(2010, 7, 4)); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadLocalDateTimeCorrectly() { LocalDateTime now = LocalDateTime.now(); @@ -618,10 +524,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result.localDateTime.getMinute()).isEqualTo(now.getMinute()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadInstantCorrectly() { LocalDateTime now = LocalDateTime.now(); @@ -636,10 +539,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result.instant.getEpochSecond()).isEqualTo(instant.getEpochSecond()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadZoneIdCorrectly() { Row rowMock = RowMockUtil.newRowMock(column("id", "my-id", DataType.ascii()), @@ -651,10 +551,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result.zoneId.getId()).isEqualTo("Europe/Paris"); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadJodaLocalDateTimeUsingCassandraDateCorrectly() { Row rowMock = RowMockUtil.newRowMock(column("id", "my-id", DataType.ascii()), @@ -669,10 +566,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result.localDate.getDayOfMonth()).isEqualTo(4); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldCreateInsertWithJodaLocalDateUsingCassandraDateCorrectly() { TypeWithJodaLocalDateMappedToDate typeWithLocalDate = new TypeWithJodaLocalDateMappedToDate(); @@ -685,10 +579,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getValues(insert).contains(LocalDate.fromYearMonthDay(2010, 7, 4))).isTrue(); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldCreateUpdateWithJodaLocalDateUsingCassandraDateCorrectly() { TypeWithJodaLocalDateMappedToDate typeWithLocalDate = new TypeWithJodaLocalDateMappedToDate(); @@ -701,10 +592,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getAssignmentValues(update)).contains(LocalDate.fromYearMonthDay(2010, 7, 4)); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadThreeTenBpLocalDateTimeUsingCassandraDateCorrectly() { Row rowMock = RowMockUtil.newRowMock(column("id", "my-id", DataType.ascii()), @@ -719,10 +607,7 @@ public class MappingCassandraConverterUnitTests { assertThat(result.localDate.getDayOfMonth()).isEqualTo(4); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldCreateInsertWithThreeTenBpLocalDateUsingCassandraDateCorrectly() { TypeWithThreeTenBpLocalDateMappedToDate typeWithLocalDate = new TypeWithThreeTenBpLocalDateMappedToDate(); @@ -735,10 +620,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getValues(insert).contains(LocalDate.fromYearMonthDay(2010, 7, 4))).isTrue(); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldCreateUpdateWithThreeTenBpLocalDateUsingCassandraDateCorrectly() { TypeWithThreeTenBpLocalDateMappedToDate typeWithLocalDate = new TypeWithThreeTenBpLocalDateMappedToDate(); @@ -751,10 +633,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getAssignmentValues(update)).contains(LocalDate.fromYearMonthDay(2010, 7, 4)); } - /** - * @see DATACASS-206 - */ - @Test + @Test // DATACASS-206 public void updateShouldUseSpecifiedColumnNames() { UserToken userToken = new UserToken(); @@ -772,10 +651,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(update)).containsEntry("user_id", userToken.getUserId()); } - /** - * @see DATACASS-206 - */ - @Test + @Test // DATACASS-206 public void deleteShouldUseSpecifiedColumnNames() { UserToken userToken = new UserToken(); @@ -791,10 +667,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(delete)).containsEntry("user_id", userToken.getUserId()); } - /** - * @see DATACASS-308 - */ - @Test + @Test // DATACASS-308 public void shouldWriteWhereConditionUsingPlainId() { Delete delete = QueryBuilder.delete().from("table"); @@ -804,10 +677,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(delete)).containsEntry("id", "42"); } - /** - * @see DATACASS-308 - */ - @Test + @Test // DATACASS-308 public void shouldWriteWhereConditionUsingEntity() { Delete delete = QueryBuilder.delete().from("table"); @@ -820,10 +690,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(delete)).containsEntry("id", "42"); } - /** - * @see DATACASS-308 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-308 public void shouldFailWriteWhereConditionUsingEntityWithNullId() { Delete delete = QueryBuilder.delete().from("table"); @@ -831,10 +698,7 @@ public class MappingCassandraConverterUnitTests { mappingCassandraConverter.write(new Person(), delete.where(), mappingContext.getPersistentEntity(Person.class)); } - /** - * @see DATACASS-308 - */ - @Test + @Test // DATACASS-308 public void shouldWriteWhereConditionUsingMapId() { Delete delete = QueryBuilder.delete().from("table"); @@ -844,10 +708,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(delete)).containsEntry("id", "42"); } - /** - * @see DATACASS-308 - */ - @Test + @Test // DATACASS-308 public void shouldWriteWhereConditionForCompositeKeyUsingEntity() { Delete delete = QueryBuilder.delete().from("table"); @@ -863,10 +724,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(delete)).containsEntry("lastname", "White"); } - /** - * @see DATACASS-308 - */ - @Test + @Test // DATACASS-308 public void shouldWriteWhereConditionForCompositeKeyUsingMapId() { Delete delete = QueryBuilder.delete().from("table"); @@ -878,10 +736,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(delete)).containsEntry("lastname", "White"); } - /** - * @see DATACASS-308 - */ - @Test + @Test // DATACASS-308 public void shouldWriteWhereConditionForMapIdKeyUsingEntity() { Delete delete = QueryBuilder.delete().from("table"); @@ -896,10 +751,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(delete)).containsEntry("lastname", "White"); } - /** - * @see DATACASS-308 - */ - @Test + @Test // DATACASS-308 public void shouldWriteEnumWhereCondition() { Delete delete = QueryBuilder.delete().from("table"); @@ -910,10 +762,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(delete)).containsEntry("condition", "MINT"); } - /** - * @see DATACASS-308 - */ - @Test + @Test // DATACASS-308 public void shouldWriteWhereConditionForMapIdKeyUsingMapId() { Delete delete = QueryBuilder.delete().from("table"); @@ -925,10 +774,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(delete)).containsEntry("lastname", "White"); } - /** - * @see DATACASS-308 - */ - @Test + @Test // DATACASS-308 public void shouldWriteWhereConditionForTypeWithPkClassKeyUsingEntity() { Delete delete = QueryBuilder.delete().from("table"); @@ -946,10 +792,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(delete)).containsEntry("lastname", "White"); } - /** - * @see DATACASS-308 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-308 public void shouldFailWritingWhereConditionForTypeWithPkClassKeyUsingEntityWithNullId() { Delete delete = QueryBuilder.delete().from("table"); @@ -958,10 +801,7 @@ public class MappingCassandraConverterUnitTests { mappingContext.getPersistentEntity(TypeWithKeyClass.class)); } - /** - * @see DATACASS-308 - */ - @Test + @Test // DATACASS-308 public void shouldWriteWhereConditionForTypeWithPkClassKeyUsingKey() { Delete delete = QueryBuilder.delete().from("table"); @@ -976,10 +816,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(delete)).containsEntry("lastname", "White"); } - /** - * @see DATACASS-308 - */ - @Test + @Test // DATACASS-308 public void shouldWriteWhereConditionForTypeWithPkClassKeyUsingMapId() { Delete delete = QueryBuilder.delete().from("table"); @@ -991,10 +828,7 @@ public class MappingCassandraConverterUnitTests { assertThat(getWherePredicates(delete)).containsEntry("lastname", "White"); } - /** - * @see DATACASS-308 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-308 public void shouldFailWhereConditionForTypeWithPkClassKeyUsingMapIdHavingUnknownProperty() { Delete delete = QueryBuilder.delete().from("table"); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/AsyncCassandraTemplateIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/AsyncCassandraTemplateIntegrationTests.java index c9f6e1914..62741c379 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/AsyncCassandraTemplateIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/AsyncCassandraTemplateIntegrationTests.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,10 +48,7 @@ public class AsyncCassandraTemplateIntegrationTests extends AbstractKeyspaceCrea SchemaTestUtils.truncate(Person.class, cassandraTemplate); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void insertShouldInsertEntity() { Person person = new Person("heisenberg", "Walter", "White"); @@ -64,10 +61,7 @@ public class AsyncCassandraTemplateIntegrationTests extends AbstractKeyspaceCrea assertThat(getUninterruptibly(template.selectOneById(person.getId(), Person.class))).isEqualTo(person); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void shouldInsertAndCountEntities() throws Exception { Person person = new Person("heisenberg", "Walter", "White"); @@ -78,10 +72,7 @@ public class AsyncCassandraTemplateIntegrationTests extends AbstractKeyspaceCrea assertThat(getUninterruptibly(count)).isEqualTo(1L); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void updateShouldUpdateEntity() throws Exception { Person person = new Person("heisenberg", "Walter", "White"); @@ -94,10 +85,7 @@ public class AsyncCassandraTemplateIntegrationTests extends AbstractKeyspaceCrea assertThat(getUninterruptibly(template.selectOneById(person.getId(), Person.class))).isEqualTo(person); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void deleteShouldRemoveEntity() throws Exception { Person person = new Person("heisenberg", "Walter", "White"); @@ -109,10 +97,7 @@ public class AsyncCassandraTemplateIntegrationTests extends AbstractKeyspaceCrea assertThat(getUninterruptibly(template.selectOneById(person.getId(), Person.class))).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void deleteByIdShouldRemoveEntity() throws Exception { Person person = new Person("heisenberg", "Walter", "White"); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/AsyncCassandraTemplateUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/AsyncCassandraTemplateUnitTests.java index 12976b332..91113045b 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/AsyncCassandraTemplateUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/AsyncCassandraTemplateUnitTests.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. @@ -38,7 +38,6 @@ import org.mockito.Captor; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import org.springframework.cassandra.support.exception.CassandraConnectionFailureException; -import org.springframework.data.cassandra.convert.MappingCassandraConverter; import org.springframework.data.cassandra.domain.Person; import org.springframework.util.concurrent.ListenableFuture; @@ -78,10 +77,7 @@ public class AsyncCassandraTemplateUnitTests { when(row.getColumnDefinitions()).thenReturn(columnDefinitions); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void selectUsingCqlShouldReturnMappedResults() { when(resultSet.iterator()).thenReturn(Collections.singleton(row).iterator()); @@ -103,10 +99,7 @@ public class AsyncCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void selectUsingCqlShouldInvokeCallbackWithMappedResults() { when(resultSet.iterator()).thenReturn(Collections.singleton(row).iterator()); @@ -132,10 +125,7 @@ public class AsyncCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void selectShouldTranslateException() throws Exception { when(resultSet.iterator()).thenThrow(new NoHostAvailableException(Collections.emptyMap())); @@ -152,10 +142,7 @@ public class AsyncCassandraTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void selectOneShouldReturnMappedResults() { when(resultSet.iterator()).thenReturn(Collections.singleton(row).iterator()); @@ -177,10 +164,7 @@ public class AsyncCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person WHERE id='myid';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void selectOneByIdShouldReturnMappedResults() { when(resultSet.iterator()).thenReturn(Collections.singleton(row).iterator()); @@ -202,10 +186,7 @@ public class AsyncCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person WHERE id='myid';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void existsShouldReturnExistingElement() { when(resultSet.iterator()).thenReturn(Collections.singleton(row).iterator()); @@ -219,10 +200,7 @@ public class AsyncCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person WHERE id='myid';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void existsShouldReturnNonExistingElement() { when(resultSet.iterator()).thenReturn(Collections.emptyIterator()); @@ -234,10 +212,7 @@ public class AsyncCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person WHERE id='myid';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void countShouldExecuteCountQueryElement() { when(resultSet.iterator()).thenReturn(Collections.singleton(row).iterator()); @@ -251,10 +226,7 @@ public class AsyncCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT count(*) FROM person;"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void insertShouldInsertEntity() { when(resultSet.wasApplied()).thenReturn(true); @@ -269,10 +241,7 @@ public class AsyncCassandraTemplateUnitTests { .isEqualTo("INSERT INTO person (firstname,id,lastname) VALUES ('Walter','heisenberg','White');"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void insertShouldTranslateException() throws Exception { reset(session); @@ -291,10 +260,7 @@ public class AsyncCassandraTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void insertShouldNotApplyInsert() { when(resultSet.wasApplied()).thenReturn(false); @@ -306,10 +272,7 @@ public class AsyncCassandraTemplateUnitTests { assertThat(getUninterruptibly(future)).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void updateShouldUpdateEntity() { when(resultSet.wasApplied()).thenReturn(true); @@ -324,10 +287,7 @@ public class AsyncCassandraTemplateUnitTests { .isEqualTo("UPDATE person SET firstname='Walter',lastname='White' WHERE id='heisenberg';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void updateShouldTranslateException() throws Exception { reset(session); @@ -346,10 +306,7 @@ public class AsyncCassandraTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void updateShouldNotApplyUpdate() { when(resultSet.wasApplied()).thenReturn(false); @@ -361,10 +318,7 @@ public class AsyncCassandraTemplateUnitTests { assertThat(getUninterruptibly(future)).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void deleteByIdShouldRemoveEntity() { when(resultSet.wasApplied()).thenReturn(true); @@ -378,10 +332,7 @@ public class AsyncCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("DELETE FROM person WHERE id='heisenberg';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void deleteShouldRemoveEntity() { when(resultSet.wasApplied()).thenReturn(true); @@ -395,10 +346,7 @@ public class AsyncCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("DELETE FROM person WHERE id='heisenberg';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void deleteShouldTranslateException() throws Exception { reset(session); @@ -417,10 +365,7 @@ public class AsyncCassandraTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void deleteShouldNotApplyRemoval() { when(resultSet.wasApplied()).thenReturn(false); @@ -432,10 +377,7 @@ public class AsyncCassandraTemplateUnitTests { assertThat(getUninterruptibly(future)).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void truncateShouldRemoveEntities() { template.truncate(Person.class); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraAdminTemplateIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraAdminTemplateIntegrationTests.java index 7d0938a92..e6442842b 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraAdminTemplateIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraAdminTemplateIntegrationTests.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. @@ -26,7 +26,6 @@ import org.springframework.cassandra.core.cql.generator.DropTableCqlGenerator; import org.springframework.cassandra.core.keyspace.DropTableSpecification; import org.springframework.cassandra.test.integration.AbstractKeyspaceCreatingIntegrationTest; import org.springframework.data.cassandra.convert.MappingCassandraConverter; -import org.springframework.data.cassandra.core.CassandraAdminTemplate; import org.springframework.data.cassandra.test.integration.simpletons.Book; import com.datastax.driver.core.KeyspaceMetadata; @@ -60,10 +59,7 @@ public class CassandraAdminTemplateIntegrationTests extends AbstractKeyspaceCrea return metadata.getKeyspace(getSession().getLoggedKeyspace()); } - /** - * @see DATACASS-173 - */ - @Test + @Test // DATACASS-173 public void testCreateTables() throws Exception { assertThat(getKeyspaceMetadata().getTables()).hasSize(0); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraBatchTemplateIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraBatchTemplateIntegrationTests.java index cc493d804..67b3fca7d 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraBatchTemplateIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraBatchTemplateIntegrationTests.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. @@ -53,10 +53,7 @@ public class CassandraBatchTemplateIntegrationTests extends AbstractKeyspaceCrea SchemaTestUtils.truncate(FlatGroup.class, template); } - /** - * @see DATACASS-288 - */ - @Test + @Test // DATACASS-288 public void shouldInsertEntities() { Group walter = new Group(new GroupKey("users", "0x1", "walter")); @@ -70,10 +67,7 @@ public class CassandraBatchTemplateIntegrationTests extends AbstractKeyspaceCrea assertThat(loaded.getId().getUsername()).isEqualTo(walter.getId().getUsername()); } - /** - * @see DATACASS-288 - */ - @Test + @Test // DATACASS-288 public void shouldInsertCollectionOfEntities() { Group walter = new Group(new GroupKey("users", "0x1", "walter")); @@ -87,10 +81,7 @@ public class CassandraBatchTemplateIntegrationTests extends AbstractKeyspaceCrea assertThat(loaded.getId().getUsername()).isEqualTo(walter.getId().getUsername()); } - /** - * @see DATACASS-288 - */ - @Test + @Test // DATACASS-288 public void shouldUpdateEntities() { Group walter = template.insert(new Group(new GroupKey("users", "0x1", "walter"))); @@ -107,10 +98,7 @@ public class CassandraBatchTemplateIntegrationTests extends AbstractKeyspaceCrea assertThat(loaded.getEmail()).isEqualTo(walter.getEmail()); } - /** - * @see DATACASS-288 - */ - @Test + @Test // DATACASS-288 public void shouldUpdateCollectionOfEntities() { Group walter = template.insert(new Group(new GroupKey("users", "0x1", "walter"))); @@ -127,10 +115,7 @@ public class CassandraBatchTemplateIntegrationTests extends AbstractKeyspaceCrea assertThat(loaded.getEmail()).isEqualTo(walter.getEmail()); } - /** - * @see DATACASS-288 - */ - @Test + @Test // DATACASS-288 public void shouldUpdatesCollectionOfEntities() { FlatGroup walter = template.insert(new FlatGroup("users", "0x1", "walter")); @@ -147,10 +132,7 @@ public class CassandraBatchTemplateIntegrationTests extends AbstractKeyspaceCrea assertThat(loaded.getEmail()).isEqualTo(walter.getEmail()); } - /** - * @see DATACASS-288 - */ - @Test + @Test // DATACASS-288 public void shouldDeleteEntities() { Group walter = template.insert(new Group(new GroupKey("users", "0x1", "walter"))); @@ -165,10 +147,7 @@ public class CassandraBatchTemplateIntegrationTests extends AbstractKeyspaceCrea assertThat(loaded).isNull(); } - /** - * @see DATACASS-288 - */ - @Test + @Test // DATACASS-288 public void shouldDeleteCollectionOfEntities() { Group walter = template.insert(new Group(new GroupKey("users", "0x1", "walter"))); @@ -183,10 +162,7 @@ public class CassandraBatchTemplateIntegrationTests extends AbstractKeyspaceCrea assertThat(loaded).isNull(); } - /** - * @see DATACASS-288 - */ - @Test + @Test // DATACASS-288 public void shouldApplyTimestampToAllEntities() { Group walter = new Group(new GroupKey("users", "0x1", "walter")); @@ -209,10 +185,7 @@ public class CassandraBatchTemplateIntegrationTests extends AbstractKeyspaceCrea } } - /** - * @see DATACASS-288 - */ - @Test(expected = IllegalStateException.class) + @Test(expected = IllegalStateException.class) // DATACASS-288 public void shouldNotExecuteTwice() { CassandraBatchOperations batchOperations = new CassandraBatchTemplate(template); @@ -223,10 +196,7 @@ public class CassandraBatchTemplateIntegrationTests extends AbstractKeyspaceCrea fail("Missing IllegalStateException"); } - /** - * @see DATACASS-288 - */ - @Test(expected = IllegalStateException.class) + @Test(expected = IllegalStateException.class) // DATACASS-288 public void shouldNotAllowModificationAfterExecution() { CassandraBatchOperations batchOperations = new CassandraBatchTemplate(template); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraPersistentEntitySchemaCreatorUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraPersistentEntitySchemaCreatorUnitTests.java index d6b3a1b9f..d372b8e47 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraPersistentEntitySchemaCreatorUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraPersistentEntitySchemaCreatorUnitTests.java @@ -66,10 +66,7 @@ public class CassandraPersistentEntitySchemaCreatorUnitTests { when(adminOperations.getCqlOperations()).thenReturn(operations); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldCreateTypesInOrder() { context.getPersistentEntity(MoonType.class); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraPersistentEntitySchemaDropperUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraPersistentEntitySchemaDropperUnitTests.java index 7b812ba68..ed050b52f 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraPersistentEntitySchemaDropperUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraPersistentEntitySchemaDropperUnitTests.java @@ -58,9 +58,7 @@ public class CassandraPersistentEntitySchemaDropperUnitTests { BasicCassandraMappingContext context = new BasicCassandraMappingContext(); - /** - * @see DATACASS-355 - */ + // DATACASS-355 @Before public void setUp() throws Exception { @@ -79,10 +77,7 @@ public class CassandraPersistentEntitySchemaDropperUnitTests { when(contact.getName()).thenReturn("contact"); } - /** - * @see DATACASS-355 - */ - @Test + @Test // DATACASS-355 public void shouldDropTypes() throws Exception { context.setInitialEntitySet(new HashSet>(Arrays.asList(MoonType.class, UniverseType.class))); @@ -102,10 +97,7 @@ public class CassandraPersistentEntitySchemaDropperUnitTests { verifyNoMoreInteractions(operations); } - /** - * @see DATACASS-355 - */ - @Test + @Test // DATACASS-355 public void dropUserTypesShouldRetainUnusedTypes() { context.setInitialEntitySet(new HashSet>(Arrays.asList(MoonType.class, UniverseType.class))); @@ -124,10 +116,7 @@ public class CassandraPersistentEntitySchemaDropperUnitTests { verifyNoMoreInteractions(operations); } - /** - * @see DATACASS-355 - */ - @Test + @Test // DATACASS-355 public void shouldDropTables() throws Exception { context.setInitialEntitySet(Collections.singleton(Person.class)); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraTemplateIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraTemplateIntegrationTests.java index 3425ca3a2..cf46c315e 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraTemplateIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraTemplateIntegrationTests.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. @@ -60,10 +60,7 @@ public class CassandraTemplateIntegrationTests extends AbstractKeyspaceCreatingI SchemaTestUtils.truncate(BookReference.class, template); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void insertShouldInsertEntity() { Person person = new Person("heisenberg", "Walter", "White"); @@ -76,10 +73,7 @@ public class CassandraTemplateIntegrationTests extends AbstractKeyspaceCreatingI assertThat(template.selectOneById(person.getId(), Person.class)).isEqualTo(person); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void shouldInsertAndCountEntities() { Person person = new Person("heisenberg", "Walter", "White"); @@ -90,10 +84,7 @@ public class CassandraTemplateIntegrationTests extends AbstractKeyspaceCreatingI assertThat(count).isEqualTo(1L); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void updateShouldUpdateEntity() { Person person = new Person("heisenberg", "Walter", "White"); @@ -106,10 +97,7 @@ public class CassandraTemplateIntegrationTests extends AbstractKeyspaceCreatingI assertThat(template.selectOneById(person.getId(), Person.class)).isEqualTo(person); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void deleteShouldRemoveEntity() { Person person = new Person("heisenberg", "Walter", "White"); @@ -121,10 +109,7 @@ public class CassandraTemplateIntegrationTests extends AbstractKeyspaceCreatingI assertThat(template.selectOneById(person.getId(), Person.class)).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void deleteByIdShouldRemoveEntity() { Person person = new Person("heisenberg", "Walter", "White"); @@ -136,10 +121,7 @@ public class CassandraTemplateIntegrationTests extends AbstractKeyspaceCreatingI assertThat(template.selectOneById(person.getId(), Person.class)).isNull(); } - /** - * @see DATACASS-182 - */ - @Test + @Test // DATACASS-182 public void stream() { Person person = new Person("heisenberg", "Walter", "White"); @@ -150,10 +132,7 @@ public class CassandraTemplateIntegrationTests extends AbstractKeyspaceCreatingI assertThat(stream.collect(Collectors.toList())).hasSize(1).contains(person); } - /** - * @see DATACASS-182 - */ - @Test + @Test // DATACASS-182 public void updateShouldRemoveFields() { Person person = new Person("heisenberg", "Walter", "White"); @@ -169,10 +148,7 @@ public class CassandraTemplateIntegrationTests extends AbstractKeyspaceCreatingI assertThat(loaded.getId()).isEqualTo("heisenberg"); } - /** - * @see DATACASS-182 - */ - @Test + @Test // DATACASS-182 public void insertShouldRemoveFields() { Person person = new Person("heisenberg", "Walter", "White"); @@ -188,10 +164,7 @@ public class CassandraTemplateIntegrationTests extends AbstractKeyspaceCreatingI assertThat(loaded.getId()).isEqualTo("heisenberg"); } - /** - * @see DATACASS-182 - */ - @Test + @Test // DATACASS-182 public void insertAndUpdateToEmptyCollection() { BookReference bookReference = new BookReference(); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraTemplateUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraTemplateUnitTests.java index f1615c1f7..cc770128a 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraTemplateUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraTemplateUnitTests.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. @@ -24,7 +24,6 @@ import static org.mockito.Mockito.anyInt; import java.util.Collections; import java.util.List; -import com.datastax.driver.core.querybuilder.Batch; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; @@ -37,6 +36,7 @@ import org.mockito.runners.MockitoJUnitRunner; import org.springframework.cassandra.support.exception.CassandraConnectionFailureException; import org.springframework.data.cassandra.convert.MappingCassandraConverter; import org.springframework.data.cassandra.domain.Person; +import org.springframework.data.cassandra.test.integration.simpletons.Book; import com.datastax.driver.core.ColumnDefinitions; import com.datastax.driver.core.DataType; @@ -45,7 +45,7 @@ import com.datastax.driver.core.Row; import com.datastax.driver.core.Session; import com.datastax.driver.core.Statement; import com.datastax.driver.core.exceptions.NoHostAvailableException; -import org.springframework.data.cassandra.test.integration.simpletons.Book; +import com.datastax.driver.core.querybuilder.Batch; /** * Unit tests for {@link CassandraTemplate}. @@ -73,10 +73,7 @@ public class CassandraTemplateUnitTests { when(row.getColumnDefinitions()).thenReturn(columnDefinitions); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void selectUsingCqlShouldReturnMappedResults() { when(resultSet.iterator()).thenReturn(Collections.singleton(row).iterator()); @@ -98,10 +95,7 @@ public class CassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void selectShouldTranslateException() throws Exception { when(resultSet.iterator()).thenThrow(new NoHostAvailableException(Collections.emptyMap())); @@ -115,10 +109,7 @@ public class CassandraTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void selectOneShouldReturnMappedResults() { when(resultSet.iterator()).thenReturn(Collections.singleton(row).iterator()); @@ -140,10 +131,7 @@ public class CassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person WHERE id='myid';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void selectOneByIdShouldReturnMappedResults() { when(resultSet.iterator()).thenReturn(Collections.singleton(row).iterator()); @@ -165,10 +153,7 @@ public class CassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person WHERE id='myid';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void existsShouldReturnExistingElement() { when(resultSet.iterator()).thenReturn(Collections.singleton(row).iterator()); @@ -182,10 +167,7 @@ public class CassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person WHERE id='myid';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void existsShouldReturnNonExistingElement() { when(resultSet.iterator()).thenReturn(Collections.emptyIterator()); @@ -197,10 +179,7 @@ public class CassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person WHERE id='myid';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void countShouldExecuteCountQueryElement() { when(resultSet.iterator()).thenReturn(Collections.singleton(row).iterator()); @@ -214,10 +193,7 @@ public class CassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT count(*) FROM person;"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void insertShouldInsertEntity() { when(resultSet.wasApplied()).thenReturn(true); @@ -232,10 +208,7 @@ public class CassandraTemplateUnitTests { .isEqualTo("INSERT INTO person (firstname,id,lastname) VALUES ('Walter','heisenberg','White');"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void insertShouldTranslateException() throws Exception { reset(session); @@ -250,10 +223,7 @@ public class CassandraTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void insertShouldNotApplyInsert() { when(resultSet.wasApplied()).thenReturn(false); @@ -265,10 +235,7 @@ public class CassandraTemplateUnitTests { assertThat(inserted).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void updateShouldUpdateEntity() { when(resultSet.wasApplied()).thenReturn(true); @@ -283,10 +250,7 @@ public class CassandraTemplateUnitTests { .isEqualTo("UPDATE person SET firstname='Walter',lastname='White' WHERE id='heisenberg';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void updateShouldTranslateException() throws Exception { reset(session); @@ -301,10 +265,7 @@ public class CassandraTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void updateShouldNotApplyUpdate() { when(resultSet.wasApplied()).thenReturn(false); @@ -316,10 +277,7 @@ public class CassandraTemplateUnitTests { assertThat(updated).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void deleteByIdShouldRemoveEntity() { when(resultSet.wasApplied()).thenReturn(true); @@ -333,10 +291,7 @@ public class CassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("DELETE FROM person WHERE id='heisenberg';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void deleteShouldRemoveEntity() { when(resultSet.wasApplied()).thenReturn(true); @@ -350,10 +305,7 @@ public class CassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("DELETE FROM person WHERE id='heisenberg';"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void deleteShouldTranslateException() throws Exception { reset(session); @@ -368,10 +320,7 @@ public class CassandraTemplateUnitTests { } } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void deleteShouldNotApplyRemoval() { when(resultSet.wasApplied()).thenReturn(false); @@ -383,10 +332,7 @@ public class CassandraTemplateUnitTests { assertThat(deleted).isNull(); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 public void truncateShouldRemoveEntities() { template.truncate(Person.class); @@ -395,10 +341,7 @@ public class CassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("TRUNCATE person;"); } - /** - * @see DATACASS-292 - */ - @Test + @Test // DATACASS-292 @Ignore public void batchOperationsShouldCallSession() { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateIntegrationTests.java index 5b2d10780..7b5592e86 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateIntegrationTests.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. @@ -17,6 +17,9 @@ package org.springframework.data.cassandra.core; import static org.assertj.core.api.Assertions.*; +import reactor.core.publisher.Mono; +import reactor.core.scheduler.Schedulers; + import org.junit.Before; import org.junit.Test; import org.springframework.cassandra.core.DefaultBridgedReactiveSession; @@ -26,9 +29,6 @@ import org.springframework.data.cassandra.convert.MappingCassandraConverter; import org.springframework.data.cassandra.domain.Person; import org.springframework.data.cassandra.test.integration.support.SchemaTestUtils; -import reactor.core.publisher.Mono; -import reactor.core.scheduler.Schedulers; - /** * Integration tests for {@link ReactiveCassandraTemplate}. * @@ -51,10 +51,7 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC SchemaTestUtils.truncate(Person.class, cassandraTemplate); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void insertShouldInsertEntity() { Person person = new Person("heisenberg", "Walter", "White"); @@ -69,10 +66,7 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC assertThat(oneById.block()).isNotNull().isEqualTo(saved); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void shouldInsertAndCountEntities() { Person person = new Person("heisenberg", "Walter", "White"); @@ -83,10 +77,7 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC assertThat(count.block()).isEqualTo(1L); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void updateShouldUpdateEntity() { Person person = new Person("heisenberg", "Walter", "White"); @@ -100,10 +91,7 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC assertThat(oneById.block()).isEqualTo(person); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void deleteShouldRemoveEntity() { Person person = new Person("heisenberg", "Walter", "White"); @@ -116,10 +104,7 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC assertThat(oneById.block()).isNull(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void deleteByIdShouldRemoveEntity() { Person person = new Person("heisenberg", "Walter", "White"); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateUnitTests.java index 17279cd34..56743e28c 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateUnitTests.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. @@ -21,6 +21,9 @@ import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.*; import static org.mockito.Mockito.anyInt; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + import java.util.Collections; import org.junit.Before; @@ -33,7 +36,6 @@ import org.mockito.runners.MockitoJUnitRunner; import org.springframework.cassandra.core.ReactiveResultSet; import org.springframework.cassandra.core.ReactiveSession; import org.springframework.cassandra.support.exception.CassandraConnectionFailureException; -import org.springframework.data.cassandra.convert.MappingCassandraConverter; import org.springframework.data.cassandra.domain.Person; import com.datastax.driver.core.ColumnDefinitions; @@ -42,9 +44,6 @@ import com.datastax.driver.core.Row; import com.datastax.driver.core.Statement; import com.datastax.driver.core.exceptions.NoHostAvailableException; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - /** * Unit tests for {@link ReactiveCassandraTemplate}. * @@ -71,10 +70,7 @@ public class ReactiveCassandraTemplateUnitTests { when(row.getColumnDefinitions()).thenReturn(columnDefinitions); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void selectUsingCqlShouldReturnMappedResults() { when(reactiveResultSet.rows()).thenReturn(Flux.just(row)); @@ -96,10 +92,7 @@ public class ReactiveCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void selectShouldTranslateException() { when(reactiveResultSet.rows()).thenThrow(new NoHostAvailableException(Collections.emptyMap())); @@ -115,10 +108,7 @@ public class ReactiveCassandraTemplateUnitTests { } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void selectOneByIdShouldReturnMappedResults() { when(reactiveResultSet.rows()).thenReturn(Flux.just(row)); @@ -140,10 +130,7 @@ public class ReactiveCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person WHERE id='myid';"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void existsShouldReturnExistingElement() { when(reactiveResultSet.rows()).thenReturn(Flux.just(row)); @@ -157,10 +144,7 @@ public class ReactiveCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person WHERE id='myid';"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void existsShouldReturnNonExistingElement() { when(reactiveResultSet.rows()).thenReturn(Flux.empty()); @@ -172,10 +156,7 @@ public class ReactiveCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM person WHERE id='myid';"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void countShouldExecuteCountQueryElement() { when(reactiveResultSet.rows()).thenReturn(Flux.just(row)); @@ -189,10 +170,7 @@ public class ReactiveCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT count(*) FROM person;"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void insertShouldInsertEntity() { when(reactiveResultSet.wasApplied()).thenReturn(true); @@ -206,10 +184,7 @@ public class ReactiveCassandraTemplateUnitTests { .isEqualTo("INSERT INTO person (firstname,id,lastname) VALUES ('Walter','heisenberg','White');"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void insertShouldTranslateException() { reset(session); @@ -227,10 +202,7 @@ public class ReactiveCassandraTemplateUnitTests { } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void insertShouldNotApplyInsert() { when(reactiveResultSet.wasApplied()).thenReturn(false); @@ -241,10 +213,7 @@ public class ReactiveCassandraTemplateUnitTests { assertThat(mono.block()).isNull(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void updateShouldUpdateEntity() { when(reactiveResultSet.wasApplied()).thenReturn(true); @@ -258,10 +227,7 @@ public class ReactiveCassandraTemplateUnitTests { .isEqualTo("UPDATE person SET firstname='Walter',lastname='White' WHERE id='heisenberg';"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void updateShouldTranslateException() { reset(session); @@ -279,10 +245,7 @@ public class ReactiveCassandraTemplateUnitTests { } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void updateShouldNotApplyUpdate() { when(reactiveResultSet.wasApplied()).thenReturn(false); @@ -293,10 +256,7 @@ public class ReactiveCassandraTemplateUnitTests { assertThat(mono.block()).isNull(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void deleteShouldRemoveEntity() { when(reactiveResultSet.wasApplied()).thenReturn(true); @@ -310,10 +270,7 @@ public class ReactiveCassandraTemplateUnitTests { assertThat(statementCaptor.getValue().toString()).isEqualTo("DELETE FROM person WHERE id='heisenberg';"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void deleteShouldTranslateException() { reset(session); @@ -331,10 +288,7 @@ public class ReactiveCassandraTemplateUnitTests { } } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void deleteShouldNotApplyRemoval() { when(reactiveResultSet.wasApplied()).thenReturn(false); @@ -345,10 +299,7 @@ public class ReactiveCassandraTemplateUnitTests { assertThat(mono.block()).isNull(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void truncateShouldRemoveEntities() { template.truncate(Person.class).block(); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/AllPossibleTypes.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/AllPossibleTypes.java index d84490781..6cd7f84f9 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/AllPossibleTypes.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/AllPossibleTypes.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. @@ -15,6 +15,11 @@ */ package org.springframework.data.cassandra.domain; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.NonNull; +import lombok.RequiredArgsConstructor; + import java.math.BigDecimal; import java.math.BigInteger; import java.net.InetAddress; @@ -32,11 +37,6 @@ import org.springframework.data.cassandra.test.integration.mapping.types.Cassand import com.datastax.driver.core.DataType.Name; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.NonNull; -import lombok.RequiredArgsConstructor; - /** * @author Mark Paluch */ diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/CompositeKey.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/CompositeKey.java index 7eaeab058..671e5b8c1 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/CompositeKey.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/CompositeKey.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. @@ -15,14 +15,14 @@ */ package org.springframework.data.cassandra.domain; +import lombok.Data; + import java.io.Serializable; import org.springframework.cassandra.core.PrimaryKeyType; import org.springframework.data.cassandra.mapping.PrimaryKeyClass; import org.springframework.data.cassandra.mapping.PrimaryKeyColumn; -import lombok.Data; - /** * @author Mark Paluch */ diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/FlatGroup.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/FlatGroup.java index 8ce380c2c..bcb5602f8 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/FlatGroup.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/FlatGroup.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. @@ -15,15 +15,16 @@ */ package org.springframework.data.cassandra.domain; +import lombok.Data; + import org.springframework.cassandra.core.PrimaryKeyType; import org.springframework.data.cassandra.mapping.PrimaryKeyColumn; import org.springframework.data.cassandra.mapping.Table; -import lombok.Data; - /** * @author Mark Paluch - * @see http://www.datastax.com/dev/blog/basic-rules-of-cassandra-data-modeling + * @see http://www.datastax.com/dev/blog/basic-rules-of-cassandra-data-modeling */ @Table @Data diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/Group.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/Group.java index 0e9cb27bd..6a49dc5dd 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/Group.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/Group.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. @@ -15,15 +15,16 @@ */ package org.springframework.data.cassandra.domain; -import org.springframework.data.cassandra.mapping.PrimaryKey; -import org.springframework.data.cassandra.mapping.Table; - import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.data.cassandra.mapping.PrimaryKey; +import org.springframework.data.cassandra.mapping.Table; + /** * @author Mark Paluch - * @see http://www.datastax.com/dev/blog/basic-rules-of-cassandra-data-modeling + * @see http://www.datastax.com/dev/blog/basic-rules-of-cassandra-data-modeling */ @Table @Data diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/GroupKey.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/GroupKey.java index c368c39fa..8e8c7d4cb 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/GroupKey.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/GroupKey.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. @@ -15,19 +15,20 @@ */ package org.springframework.data.cassandra.domain; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + import java.io.Serializable; import org.springframework.cassandra.core.PrimaryKeyType; import org.springframework.data.cassandra.mapping.PrimaryKeyClass; import org.springframework.data.cassandra.mapping.PrimaryKeyColumn; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - /** * @author Mark Paluch - * @see http://www.datastax.com/dev/blog/basic-rules-of-cassandra-data-modeling + * @see http://www.datastax.com/dev/blog/basic-rules-of-cassandra-data-modeling */ @PrimaryKeyClass @Data diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/Person.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/Person.java index 00d15ee3e..7e2106570 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/Person.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/Person.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. @@ -15,13 +15,13 @@ */ package org.springframework.data.cassandra.domain; -import org.springframework.data.annotation.Id; -import org.springframework.data.cassandra.mapping.Table; - import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.data.annotation.Id; +import org.springframework.data.cassandra.mapping.Table; + /** * @author Mark Paluch */ diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/TypeWithCompositeKey.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/TypeWithCompositeKey.java index 100da73a4..677229786 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/TypeWithCompositeKey.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/TypeWithCompositeKey.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. @@ -15,12 +15,12 @@ */ package org.springframework.data.cassandra.domain; +import lombok.Data; + import org.springframework.cassandra.core.PrimaryKeyType; import org.springframework.data.cassandra.mapping.PrimaryKeyColumn; import org.springframework.data.cassandra.mapping.Table; -import lombok.Data; - /** * @author Mark Paluch */ diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/TypeWithKeyClass.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/TypeWithKeyClass.java index ceadaac2b..2f9b78cdd 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/TypeWithKeyClass.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/TypeWithKeyClass.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. @@ -15,11 +15,11 @@ */ package org.springframework.data.cassandra.domain; +import lombok.Data; + import org.springframework.data.cassandra.mapping.PrimaryKey; import org.springframework.data.cassandra.mapping.Table; -import lombok.Data; - /** * @author Mark Paluch */ diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/TypeWithMapId.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/TypeWithMapId.java index e721ab4da..8515f6e07 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/TypeWithMapId.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/TypeWithMapId.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. @@ -15,6 +15,8 @@ */ package org.springframework.data.cassandra.domain; +import lombok.Data; + import org.springframework.cassandra.core.PrimaryKeyType; import org.springframework.data.cassandra.mapping.PrimaryKeyColumn; import org.springframework.data.cassandra.mapping.Table; @@ -22,8 +24,6 @@ import org.springframework.data.cassandra.repository.MapId; import org.springframework.data.cassandra.repository.MapIdentifiable; import org.springframework.data.cassandra.repository.support.BasicMapId; -import lombok.Data; - /** * @author Mark Paluch */ diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/UserToken.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/UserToken.java index 9104c7294..f927f5f76 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/UserToken.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/domain/UserToken.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. @@ -15,6 +15,8 @@ */ package org.springframework.data.cassandra.domain; +import lombok.Data; + import java.util.UUID; import org.springframework.cassandra.core.PrimaryKeyType; @@ -25,8 +27,6 @@ import org.springframework.data.cassandra.mapping.Table; import com.datastax.driver.core.DataType.Name; -import lombok.Data; - /** * @author Mark Paluch */ diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraMappingContextUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraMappingContextUnitTests.java index cfefac7e6..342d1fdef 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraMappingContextUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraMappingContextUnitTests.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. @@ -36,7 +36,6 @@ import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.data.annotation.Id; import org.springframework.data.cassandra.convert.CustomConversions; import org.springframework.data.convert.WritingConverter; -import org.springframework.data.mapping.model.MappingException; import org.springframework.data.util.ClassTypeInformation; import com.datastax.driver.core.DataType; @@ -83,10 +82,7 @@ public class BasicCassandraMappingContextUnitTests { assertThat(mappingContext.contains(Y.class)).isFalse(); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void primaryKeyOnPropertyShouldWork() { CassandraPersistentEntity persistentEntity = mappingContext.getPersistentEntity(PrimaryKeyOnProperty.class); @@ -116,10 +112,7 @@ public class BasicCassandraMappingContextUnitTests { } } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void primaryKeyColumnsOnPropertyShouldWork() { CassandraPersistentEntity persistentEntity = mappingContext @@ -166,10 +159,7 @@ public class BasicCassandraMappingContextUnitTests { } } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void primaryKeyClassWithPrimaryKeyColumnsOnPropertyShouldWork() { CassandraPersistentEntity persistentEntity = mappingContext @@ -199,10 +189,7 @@ public class BasicCassandraMappingContextUnitTests { assertThat(lastname.getColumnName().toCql()).isEqualTo("mylastname"); } - /** - * @see DATACASS-340 - */ - @Test + @Test // DATACASS-340 public void createdTableSpecificationShouldConsiderClusterColumnOrdering() { CassandraPersistentEntity persistentEntity = mappingContext @@ -226,10 +213,7 @@ public class BasicCassandraMappingContextUnitTests { assertThat(kind.getOrdering()).isEqualTo(Ordering.ASCENDING); } - /** - * @see DATACASS-340 - */ - @Test + @Test // DATACASS-340 public void createdTableSpecificationShouldConsiderPrimaryKeyClassClusterColumnOrdering() { CassandraPersistentEntity persistentEntity = mappingContext @@ -317,20 +301,14 @@ public class BasicCassandraMappingContextUnitTests { @PrimaryKey PrimaryKeyWithOrderedClusteredColumns key; } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldCreatePersistentEntityIfNoConversionRegistered() { mappingContext.setCustomConversions(new CustomConversions(Collections.EMPTY_LIST)); assertThat(mappingContext.shouldCreatePersistentEntityFor(ClassTypeInformation.from(Human.class))).isTrue(); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldNotCreateEntitiesForCustomConvertedTypes() { mappingContext @@ -339,10 +317,7 @@ public class BasicCassandraMappingContextUnitTests { assertThat(mappingContext.shouldCreatePersistentEntityFor(ClassTypeInformation.from(Human.class))).isFalse(); } - /** - * @see DATACASS-349 - */ - @Test + @Test // DATACASS-349 public void propertyTypeShouldConsiderRegisteredConverterForPropertyType() { mappingContext @@ -358,10 +333,7 @@ public class BasicCassandraMappingContextUnitTests { .isEqualTo(DataType.ascii()); } - /** - * @see DATACASS-349 - */ - @Test + @Test // DATACASS-349 public void propertyTypeShouldConsiderRegisteredConverterForCollectionComponentType() { mappingContext @@ -373,10 +345,7 @@ public class BasicCassandraMappingContextUnitTests { .isEqualTo(DataType.list(DataType.varchar())); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldRegisterUdtTypes() { CassandraPersistentEntity persistentEntity = mappingContext.getPersistentEntity(MappedUdt.class); @@ -384,10 +353,7 @@ public class BasicCassandraMappingContextUnitTests { assertThat(persistentEntity.isUserDefinedType()).isTrue(); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void getNonPrimaryKeyEntitiesShouldNotContainUdt() { CassandraPersistentEntity existingPersistentEntity = mappingContext.getPersistentEntity(MappedUdt.class); @@ -395,10 +361,7 @@ public class BasicCassandraMappingContextUnitTests { assertThat(mappingContext.getTableEntities()).doesNotContain(existingPersistentEntity); } - /** - * @see DATACASS-172, DATACASS-359 - */ - @Test + @Test // DATACASS-172, DATACASS-359 public void getPersistentEntitiesShouldContainUdt() { CassandraPersistentEntity existingPersistentEntity = mappingContext.getPersistentEntity(MappedUdt.class); @@ -409,10 +372,7 @@ public class BasicCassandraMappingContextUnitTests { assertThat(mappingContext.getTableEntities()).doesNotContain(existingPersistentEntity); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void usesTypeShouldNotReportTypeUsage() { UserType myTypeMock = mock(UserType.class, "mappedudt"); @@ -421,10 +381,7 @@ public class BasicCassandraMappingContextUnitTests { assertThat(mappingContext.usesUserType(myTypeMock)).isFalse(); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void usesTypeShouldReportTypeUsageInMappedUdt() { final UserType myTypeMock = mock(UserType.class, "mappedudt"); @@ -443,10 +400,7 @@ public class BasicCassandraMappingContextUnitTests { assertThat(mappingContext.usesUserType(myTypeMock)).isTrue(); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void usesTypeShouldReportTypeUsageInColumn() { final UserType myTypeMock = mock(UserType.class, "mappedudt"); @@ -465,10 +419,7 @@ public class BasicCassandraMappingContextUnitTests { assertThat(mappingContext.usesUserType(myTypeMock)).isTrue(); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void createTableForComplexPrimaryKeyShouldFail() { try { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentEntityMetadataVerifierUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentEntityMetadataVerifierUnitTests.java index 161a1f0f9..37e70be65 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentEntityMetadataVerifierUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentEntityMetadataVerifierUnitTests.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. @@ -41,42 +41,27 @@ public class BasicCassandraPersistentEntityMetadataVerifierUnitTests { context.setVerifier(new NoOpVerifier()); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldAllowInterfaceTypes() { verifier.verify(getEntity(MyInterface.class)); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void testPrimaryKeyClass() { verifier.verify(getEntity(Animal.class)); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void testNonPrimaryKeyClass() { verifier.verify(getEntity(Person.class)); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void testNonPersistentType() { verifier.verify(getEntity(NonPersistentClass.class)); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldFailWithPersistentAndPrimaryKeyClassAnnotations() { try { @@ -87,10 +72,7 @@ public class BasicCassandraPersistentEntityMetadataVerifierUnitTests { } } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldFailWithoutPartitionKey() { try { @@ -102,10 +84,7 @@ public class BasicCassandraPersistentEntityMetadataVerifierUnitTests { } } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldFailWithoutPrimaryKey() { try { @@ -116,10 +95,7 @@ public class BasicCassandraPersistentEntityMetadataVerifierUnitTests { } } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void testPkAndPkc() { try { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentEntityOrderPropertiesUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentEntityOrderPropertiesUnitTests.java index 288f08588..6fa6c2054 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentEntityOrderPropertiesUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentEntityOrderPropertiesUnitTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentEntityUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentEntityUnitTests.java index c7a9828c4..ea0b02f07 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentEntityUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentEntityUnitTests.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. @@ -107,10 +107,7 @@ public class BasicCassandraPersistentEntityUnitTests { verify(entitySpy, never()).setTableName(isA(CqlIdentifier.class)); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void isUserDefinedTypeShouldReturnFalse() { BasicCassandraPersistentEntity entity = new BasicCassandraPersistentEntity( @@ -119,10 +116,7 @@ public class BasicCassandraPersistentEntityUnitTests { assertThat(entity.isUserDefinedType()).isFalse(); } - /** - * @see DATACASS-259 - */ - @Test + @Test // DATACASS-259 public void shouldConsiderComposedTableAnnotation() { BasicCassandraPersistentEntity entity = new BasicCassandraPersistentEntity( @@ -131,10 +125,7 @@ public class BasicCassandraPersistentEntityUnitTests { assertThat(entity.getTableName()).isEqualTo(CqlIdentifier.cqlId("mytable", true)); } - /** - * @see DATACASS-259 - */ - @Test + @Test // DATACASS-259 public void shouldConsiderComposedPrimaryKeyClassAnnotation() { BasicCassandraPersistentEntity entity = new BasicCassandraPersistentEntity( diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentPropertyUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentPropertyUnitTests.java index 5b1c82b4a..c07390dfc 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentPropertyUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/BasicCassandraPersistentPropertyUnitTests.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. @@ -22,14 +22,14 @@ import java.lang.annotation.RetentionPolicy; import java.lang.reflect.Field; import java.util.Date; -import com.datastax.driver.core.DataType.Name; - import org.junit.Test; import org.springframework.cassandra.core.cql.CqlIdentifier; import org.springframework.core.annotation.AliasFor; import org.springframework.data.util.ClassTypeInformation; import org.springframework.util.ReflectionUtils; +import com.datastax.driver.core.DataType.Name; + /** * Unit tests for {@link BasicCassandraPersistentProperty}. * @@ -56,52 +56,39 @@ public class BasicCassandraPersistentPropertyUnitTests { assertThat(getPropertyFor(Timeline.class, "time").getColumnName().toCql()).isEqualTo("time"); } - /** - * @see DATACASS-259 - */ - @Test + @Test // DATACASS-259 public void shouldConsiderComposedColumnAnnotation() { - CassandraPersistentProperty persistentProperty = - getPropertyFor(TypeWithComposedColumnAnnotation.class, "column"); + CassandraPersistentProperty persistentProperty = getPropertyFor(TypeWithComposedColumnAnnotation.class, "column"); assertThat(persistentProperty.getColumnName()).isEqualTo(CqlIdentifier.cqlId("mycolumn", true)); } - /** - * @see DATACASS-259 - */ - @Test + @Test // DATACASS-259 public void shouldConsiderComposedPrimaryKeyAnnotation() { - CassandraPersistentProperty persistentProperty = - getPropertyFor(TypeWithComposedPrimaryKeyAnnotation.class, "column"); + CassandraPersistentProperty persistentProperty = getPropertyFor(TypeWithComposedPrimaryKeyAnnotation.class, + "column"); assertThat(persistentProperty.getColumnName()).isEqualTo(CqlIdentifier.cqlId("primary-key", true)); assertThat(persistentProperty.isIdProperty()).isTrue(); } - /** - * @see DATACASS-259 - */ - @Test + @Test // DATACASS-259 public void shouldConsiderComposedPrimaryKeyColumnAnnotation() { - CassandraPersistentProperty persistentProperty = - getPropertyFor(TypeWithComposedPrimaryKeyColumnAnnotation.class, "column"); + CassandraPersistentProperty persistentProperty = getPropertyFor(TypeWithComposedPrimaryKeyColumnAnnotation.class, + "column"); assertThat(persistentProperty.getColumnName()).isEqualTo(CqlIdentifier.cqlId("mycolumn", true)); assertThat(persistentProperty.isPrimaryKeyColumn()).isTrue(); } - /** - * @see DATACASS-259 - */ - @Test + @Test // DATACASS-259 public void shouldConsiderComposedCassandraTypeAnnotation() { - CassandraPersistentProperty persistentProperty = - getPropertyFor(TypeWithComposedCassandraTypeAnnotation.class, "column"); + CassandraPersistentProperty persistentProperty = getPropertyFor(TypeWithComposedCassandraTypeAnnotation.class, + "column"); assertThat(persistentProperty.getDataType().getName()).isEqualTo(Name.COUNTER); assertThat(persistentProperty.findAnnotation(CassandraType.class)).isNotNull(); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraCompositePrimaryKeyUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraCompositePrimaryKeyUnitTests.java index 96bafa9a7..454542352 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraCompositePrimaryKeyUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraCompositePrimaryKeyUnitTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraPersistentPropertyComparatorUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraPersistentPropertyComparatorUnitTests.java index ae76b1cb3..0bc2d43d6 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraPersistentPropertyComparatorUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraPersistentPropertyComparatorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors + * Copyright 2013-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 @@ public class CassandraPersistentPropertyComparatorUnitTests { @Mock CassandraPersistentProperty right; - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void leftAndRightAreNullReturnsZero() { assertThat(INSTANCE.compare(null, null)).isEqualTo(0); @@ -52,10 +49,7 @@ public class CassandraPersistentPropertyComparatorUnitTests { verifyZeroInteractions(right); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void leftIsNotNullAndRightIsNullReturnsOne() { assertThat(INSTANCE.compare(left, null)).isEqualTo(1); @@ -64,10 +58,7 @@ public class CassandraPersistentPropertyComparatorUnitTests { verifyZeroInteractions(right); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void leftIsNullAndRightIsNotNullReturnsMinusOne() { assertThat(INSTANCE.compare(null, right)).isEqualTo(-1); @@ -76,10 +67,7 @@ public class CassandraPersistentPropertyComparatorUnitTests { verifyZeroInteractions(right); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void leftAndRightAreEqualReturnsZero() { assertThat(INSTANCE.compare(left, left)).isEqualTo(0); @@ -89,10 +77,7 @@ public class CassandraPersistentPropertyComparatorUnitTests { verifyZeroInteractions(right); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void leftAndRightAreCompositePrimaryKeysReturnsZero() { when(left.isCompositePrimaryKey()).thenReturn(true); @@ -104,10 +89,7 @@ public class CassandraPersistentPropertyComparatorUnitTests { verify(right, times(1)).isCompositePrimaryKey(); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void leftIsCompositePrimaryKeyReturnsMinusOne() { when(left.isCompositePrimaryKey()).thenReturn(true); @@ -123,10 +105,7 @@ public class CassandraPersistentPropertyComparatorUnitTests { verify(right, times(1)).isPrimaryKeyColumn(); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void leftIsPrimaryKeyColumnReturnsMinusOne() { when(left.isCompositePrimaryKey()).thenReturn(false); @@ -142,10 +121,7 @@ public class CassandraPersistentPropertyComparatorUnitTests { verify(right, times(1)).isPrimaryKeyColumn(); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void rightIsCompositePrimaryKeyReturnsOne() { when(left.isCompositePrimaryKey()).thenReturn(false); @@ -161,10 +137,7 @@ public class CassandraPersistentPropertyComparatorUnitTests { verify(right, times(1)).isPrimaryKeyColumn(); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void rightIsPrimaryKeyColumnReturnsOne() { when(left.isCompositePrimaryKey()).thenReturn(false); @@ -180,10 +153,7 @@ public class CassandraPersistentPropertyComparatorUnitTests { verify(right, times(1)).isPrimaryKeyColumn(); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void compareLeftAndRightNamesReturnsNegativeValue() { when(left.isCompositePrimaryKey()).thenReturn(false); @@ -203,10 +173,7 @@ public class CassandraPersistentPropertyComparatorUnitTests { verify(right, times(1)).getColumnName(); } - /** - * @see DATACASS-352 - */ - @Test + @Test // DATACASS-352 public void columnNameComparisonShouldHonorContract() throws Exception { BasicCassandraMappingContext context = new BasicCassandraMappingContext(); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraPrimaryKeyColumnAnnotationComparatorUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraPrimaryKeyColumnAnnotationComparatorUnitTests.java index c1872b514..d17cb33b6 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraPrimaryKeyColumnAnnotationComparatorUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraPrimaryKeyColumnAnnotationComparatorUnitTests.java @@ -51,10 +51,7 @@ public class CassandraPrimaryKeyColumnAnnotationComparatorUnitTests { entityFive = EntityFive.class.getDeclaredField("id").getAnnotation(PrimaryKeyColumn.class); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void compareTypes() { assertThat(INSTANCE.compare(entityOne, entityTwo)).isEqualTo(1); @@ -62,10 +59,7 @@ public class CassandraPrimaryKeyColumnAnnotationComparatorUnitTests { assertThat(INSTANCE.compare(entityTwo, entityOne)).isEqualTo(-1); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void compareOrdinals() { assertThat(INSTANCE.compare(entityOne, entityThree)).isEqualTo(-1); @@ -73,10 +67,7 @@ public class CassandraPrimaryKeyColumnAnnotationComparatorUnitTests { assertThat(INSTANCE.compare(entityThree, entityOne)).isEqualTo(1); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void compareName() { assertThat(INSTANCE.compare(entityOne, entityFour)).isEqualTo(-1); @@ -84,10 +75,7 @@ public class CassandraPrimaryKeyColumnAnnotationComparatorUnitTests { assertThat(INSTANCE.compare(entityFour, entityOne)).isEqualTo(1); } - /** - * @see DATACASS-248 - */ - @Test + @Test // DATACASS-248 public void compareOrdering() { assertThat(INSTANCE.compare(entityOne, entityFive)).isEqualTo(-1); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraUserTypePersistentEntityUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraUserTypePersistentEntityUnitTests.java index 28b508cdb..18d3b4e9a 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraUserTypePersistentEntityUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CassandraUserTypePersistentEntityUnitTests.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. @@ -41,10 +41,7 @@ public class CassandraUserTypePersistentEntityUnitTests { @Mock CassandraMappingContext mappingContextMock; @Mock UserTypeResolver userTypeResolverMock; - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void isUserDefinedTypeShouldReportTrue() { CassandraUserTypePersistentEntity type = getEntity(MappedUdt.class); @@ -52,10 +49,7 @@ public class CassandraUserTypePersistentEntityUnitTests { assertThat(type.isUserDefinedType()).isTrue(); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void getTableNameShouldReturnDefaultName() { CassandraUserTypePersistentEntity type = getEntity(MappedUdt.class); @@ -64,10 +58,7 @@ public class CassandraUserTypePersistentEntityUnitTests { assertThat(type.getTableName()).isEqualTo(CqlIdentifier.cqlId("Mappedudt")); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void getTableNameShouldReturnDefinedName() { CassandraUserTypePersistentEntity type = getEntity(WithName.class); @@ -76,10 +67,7 @@ public class CassandraUserTypePersistentEntityUnitTests { assertThat(type.getTableName()).isEqualTo(CqlIdentifier.cqlId("Withname")); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void getTableNameShouldReturnDefinedNameUsingForceQuote() { CassandraUserTypePersistentEntity type = getEntity(WithForceQuote.class); @@ -88,10 +76,7 @@ public class CassandraUserTypePersistentEntityUnitTests { assertThat(type.getTableName()).isEqualTo(CqlIdentifier.cqlId("UpperCase", true)); } - /** - * @see DATACASS-259 - */ - @Test + @Test // DATACASS-259 public void shouldConsiderComposedUserDefinedTypeAnnotation() { CassandraUserTypePersistentEntity type = getEntity(TypeWithComposedAnnotation.class); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CompositeCassandraPersistentEntityMetadataVerifierUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CompositeCassandraPersistentEntityMetadataVerifierUnitTests.java index 7daca4730..1ba6bd891 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CompositeCassandraPersistentEntityMetadataVerifierUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CompositeCassandraPersistentEntityMetadataVerifierUnitTests.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. @@ -40,42 +40,27 @@ public class CompositeCassandraPersistentEntityMetadataVerifierUnitTests { context.setVerifier(verifier); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldAllowInterfaceTypes() { verifier.verify(getEntity(MyInterface.class)); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void testPrimaryKeyClass() { verifier.verify(getEntity(Animal.class)); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void testNonPrimaryKeyClass() { verifier.verify(getEntity(Person.class)); } - /** - * @see DATACASS-258, DATACASS-359 - */ - @Test + @Test // DATACASS-258, DATACASS-359 public void shouldNotFailWithNonPersistentClasses() { verifier.verify(getEntity(NonPersistentClass.class)); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldFailWithPersistentAndPrimaryKeyClassAnnotations() { try { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CompoundPrimaryKeyUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CompoundPrimaryKeyUnitTests.java index ebf9e798f..66e7dc635 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CompoundPrimaryKeyUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CompoundPrimaryKeyUnitTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CreateTableSpecificationBasicCassandraMappingContextUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CreateTableSpecificationBasicCassandraMappingContextUnitTests.java index 53bccbf3a..cd74d79a1 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CreateTableSpecificationBasicCassandraMappingContextUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/CreateTableSpecificationBasicCassandraMappingContextUnitTests.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. @@ -18,6 +18,10 @@ package org.springframework.data.cassandra.mapping; import static org.assertj.core.api.Assertions.*; import static org.mockito.Mockito.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + import java.io.IOException; import java.util.ArrayList; import java.util.Collections; @@ -43,10 +47,6 @@ import com.datastax.driver.core.DataType.Name; import com.datastax.driver.core.UDTValue; import com.datastax.driver.core.UserType; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - /** * Unit tests for {@link BasicCassandraMappingContext} targeted on {@link CreateTableSpecification}. * @@ -68,10 +68,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { ctx.setCustomConversions(customConversions); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void customConversionTestShouldCreateCorrectTableDefinition() { CassandraPersistentEntity persistentEntity = ctx.getPersistentEntity(Employee.class); @@ -97,10 +94,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(peopleCollection.getTypeArguments().get(0)).isEqualTo(DataType.varchar()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void customConversionTestShouldHonorTypeAnnotationAndCreateCorrectTableDefinition() { CassandraPersistentEntity persistentEntity = ctx.getPersistentEntity(Employee.class); @@ -118,10 +112,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(enemiesCollection.getTypeArguments().get(0)).isEqualTo(DataType.bigint()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToVarchar() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -132,10 +123,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("anEnum", specification)).isEqualTo(DataType.varchar()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToTinyInt() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -144,10 +132,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("primitiveByte", specification)).isEqualTo(DataType.tinyint()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToSmallInt() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -156,10 +141,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("primitiveShort", specification)).isEqualTo(DataType.smallint()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToBigInt() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -168,10 +150,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("primitiveLong", specification)).isEqualTo(DataType.bigint()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToVarInt() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -179,10 +158,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("bigInteger", specification)).isEqualTo(DataType.varint()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToDecimal() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -190,10 +166,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("bigDecimal", specification)).isEqualTo(DataType.decimal()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToInt() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -202,10 +175,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("primitiveInteger", specification)).isEqualTo(DataType.cint()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToFloat() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -214,10 +184,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("primitiveFloat", specification)).isEqualTo(DataType.cfloat()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToDouble() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -226,10 +193,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("primitiveDouble", specification)).isEqualTo(DataType.cdouble()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToBoolean() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -238,10 +202,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("primitiveBoolean", specification)).isEqualTo(DataType.cboolean()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToDate() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -253,10 +214,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("bpLocalDate", specification)).isEqualTo(DataType.date()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToTimestamp() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -270,10 +228,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("bpInstant", specification)).isEqualTo(DataType.timestamp()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToTimestampUsingOverrides() { CreateTableSpecification specification = getCreateTableSpecificationFor(TypeWithOverrides.class); @@ -282,10 +237,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("jodaLocalDate", specification)).isEqualTo(DataType.timestamp()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void columnsShouldMapToBlob() { CreateTableSpecification specification = getCreateTableSpecificationFor(AllPossibleTypes.class); @@ -293,10 +245,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("blob", specification)).isEqualTo(DataType.blob()); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void columnsShouldMapToUdt() { final UserType human_udt = mock(UserType.class, "human_udt"); @@ -329,10 +278,7 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("people", specification)).isEqualTo(DataType.set(peeps_udt)); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void columnsShouldMapToMapped() { final UserType mappedUdt = mock(UserType.class, "mappedudt"); @@ -353,10 +299,8 @@ public class CreateTableSpecificationBasicCassandraMappingContextUnitTests { assertThat(getColumnType("human", specification)).isEqualTo(mappedUdt); assertThat(getColumnType("friends", specification)).isEqualTo(DataType.list(mappedUdt)); assertThat(getColumnType("people", specification)).isEqualTo(DataType.set(mappedUdt)); - assertThat(getColumnType("stringToUdt", specification)) - .isEqualTo(DataType.map(DataType.varchar(), mappedUdt)); - assertThat(getColumnType("udtToString", specification)) - .isEqualTo(DataType.map(mappedUdt, DataType.varchar())); + assertThat(getColumnType("stringToUdt", specification)).isEqualTo(DataType.map(DataType.varchar(), mappedUdt)); + assertThat(getColumnType("udtToString", specification)).isEqualTo(DataType.map(mappedUdt, DataType.varchar())); } private CreateTableSpecification getCreateTableSpecificationFor(Class persistentEntityClass) { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/ForceQuotedEntitiesSimpleUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/ForceQuotedEntitiesSimpleUnitTests.java index 0b8f18d08..2f1eabcc1 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/ForceQuotedEntitiesSimpleUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/ForceQuotedEntitiesSimpleUnitTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/ForceQuotedPropertiesSimpleUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/ForceQuotedPropertiesSimpleUnitTests.java index 9a8244f59..f209c6cb1 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/ForceQuotedPropertiesSimpleUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/ForceQuotedPropertiesSimpleUnitTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/PrimaryKeyClassEntityMetadataVerifierUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/PrimaryKeyClassEntityMetadataVerifierUnitTests.java index 2a602f5c1..5d426f9c7 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/PrimaryKeyClassEntityMetadataVerifierUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/PrimaryKeyClassEntityMetadataVerifierUnitTests.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. @@ -40,42 +40,27 @@ public class PrimaryKeyClassEntityMetadataVerifierUnitTests { context.setVerifier(new NoOpVerifier()); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldAllowNonPersistentClasses() { verifier.verify(getEntity(NonPersistentClass.class)); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldAllowInterfaceTypes() { verifier.verify(getEntity(MyInterface.class)); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldAllowTableClass() { verifier.verify(getEntity(Person.class)); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldVerifyPrimaryKeyClass() { verifier.verify(getEntity(AnimalPK.class)); } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldFailWithPersistentAndPrimaryKeyClassAnnotations() { try { @@ -86,80 +71,67 @@ public class PrimaryKeyClassEntityMetadataVerifierUnitTests { } } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldFailWithoutPartitionKey() { try { verifier.verify(getEntity(NoPartitionKey.class)); fail("Missing MappingException"); } catch (MappingException e) { - assertThat(e).hasMessageContaining("At least one of the @PrimaryKeyColumn annotations must have a type of PARTITIONED"); + assertThat(e) + .hasMessageContaining("At least one of the @PrimaryKeyColumn annotations must have a type of PARTITIONED"); } } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldFailWithoutPrimaryKey() { try { verifier.verify(getEntity(NoPrimaryKey.class)); fail("Missing MappingException"); } catch (MappingException e) { - assertThat(e).hasMessageContaining("At least one of the @PrimaryKeyColumn annotations must have a type of PARTITIONED"); + assertThat(e) + .hasMessageContaining("At least one of the @PrimaryKeyColumn annotations must have a type of PARTITIONED"); } } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldFailOnPrimaryKeyCycles() { try { verifier.verify(getEntity(TypeCycle.class)); fail("Missing MappingException"); } catch (MappingException e) { - assertThat(e).hasMessageContaining("Composite primary keys are not allowed inside of composite primary key classes"); + assertThat(e) + .hasMessageContaining("Composite primary keys are not allowed inside of composite primary key classes"); } } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldFailWithNestedPrimaryKeyClassReference() { try { verifier.verify(getEntity(PKClassWithNestedCompositeKey.class)); fail("Missing MappingException"); } catch (MappingException e) { - assertThat(e).hasMessageContaining("Composite primary keys are not allowed inside of composite primary key classes"); + assertThat(e) + .hasMessageContaining("Composite primary keys are not allowed inside of composite primary key classes"); } } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldFailWithPrimaryKeyClassAndPrimaryKeyAnnotations() { try { verifier.verify(getEntity(PrimaryKeyAndPrimaryKeyColumn.class)); fail("Missing MappingException"); } catch (MappingException e) { - assertThat(e).hasMessageContaining("Annotations @Id and @PrimaryKey are invalid for type annotated with @PrimaryKeyClass"); + assertThat(e) + .hasMessageContaining("Annotations @Id and @PrimaryKey are invalid for type annotated with @PrimaryKeyClass"); } } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void shouldFailForPrimaryKeyDerivedFromOtherThanObject() { try { @@ -267,7 +239,6 @@ public class PrimaryKeyClassEntityMetadataVerifierUnitTests { private static class NoOpVerifier implements CassandraPersistentEntityMetadataVerifier { @Override - public void verify(CassandraPersistentEntity entity) throws MappingException { - } + public void verify(CassandraPersistentEntity entity) throws MappingException {} } } diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/VerifierMappingExceptionsUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/VerifierMappingExceptionsUnitTests.java index 8a9a23eaa..e6d5d17c0 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/VerifierMappingExceptionsUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/VerifierMappingExceptionsUnitTests.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. @@ -43,10 +43,7 @@ public class VerifierMappingExceptionsUnitTests { } - /** - * @see DATACASS-258 - */ - @Test + @Test // DATACASS-258 public void testDeprecatedMutability() { VerifierMappingExceptions exceptions = new VerifierMappingExceptions(entityMock, "err"); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/MultipackageScanningUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/MultipackageScanningUnitTests.java index 719fe371a..46d7471fe 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/MultipackageScanningUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/MultipackageScanningUnitTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/Top.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/Top.java index 0d721b541..645b2585e 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/Top.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/Top.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/first/First.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/first/First.java index 75c2282f7..2d3ea8014 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/first/First.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/first/First.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/second/Second.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/second/Second.java index 8349ae153..9f50e1fa8 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/second/Second.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/second/Second.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/third/Third.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/third/Third.java index 0e7062b06..3195de2e7 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/third/Third.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/mapping/multipackagescanning/third/Third.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ConvertingReactiveCassandraRepositoryTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ConvertingReactiveCassandraRepositoryTests.java index b88dde04e..f1bf52c22 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ConvertingReactiveCassandraRepositoryTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ConvertingReactiveCassandraRepositoryTests.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. @@ -100,10 +100,7 @@ public class ConvertingReactiveCassandraRepositoryTests extends AbstractKeyspace subscriber.await().assertComplete().assertNoError(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void reactiveStreamsMethodsShouldWork() throws InterruptedException { TestSubscriber subscriber = TestSubscriber.subscribe(reactivePersonRepostitory.exists(dave.getId())); @@ -111,26 +108,20 @@ public class ConvertingReactiveCassandraRepositoryTests extends AbstractKeyspace subscriber.awaitAndAssertNextValueCount(1).assertNoError().assertValues(true); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void reactiveStreamsQueryMethodsShouldWork() { - TestSubscriber subscriber = TestSubscriber.subscribe( - reactivePersonRepostitory.findByLastname(boyd.getLastname())); + TestSubscriber subscriber = TestSubscriber + .subscribe(reactivePersonRepostitory.findByLastname(boyd.getLastname())); subscriber.awaitAndAssertNextValueCount(1).assertValues(boyd); } - /** - * @see DATACASS-360 - */ - @Test + @Test // DATACASS-360 public void dtoProjectionShouldWork() { - TestSubscriber subscriber = TestSubscriber.subscribe( - reactivePersonRepostitory.findProjectedByLastname(boyd.getLastname())); + TestSubscriber subscriber = TestSubscriber + .subscribe(reactivePersonRepostitory.findProjectedByLastname(boyd.getLastname())); subscriber.awaitAndAssertNextValueCount(1).assertValuesWith(personDto -> { assertThat(personDto.firstname).isEqualTo(boyd.getFirstname()); @@ -138,10 +129,7 @@ public class ConvertingReactiveCassandraRepositoryTests extends AbstractKeyspace }); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void simpleRxJavaMethodsShouldWork() { rx.observers.TestSubscriber subscriber = new rx.observers.TestSubscriber<>(); @@ -154,10 +142,7 @@ public class ConvertingReactiveCassandraRepositoryTests extends AbstractKeyspace subscriber.assertValue(true); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void existsWithSingleRxJavaIdMethodsShouldWork() { rx.observers.TestSubscriber subscriber = new rx.observers.TestSubscriber<>(); @@ -170,10 +155,7 @@ public class ConvertingReactiveCassandraRepositoryTests extends AbstractKeyspace subscriber.assertValue(true); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void singleRxJavaQueryMethodShouldWork() { rx.observers.TestSubscriber subscriber = new rx.observers.TestSubscriber<>(); @@ -186,10 +168,7 @@ public class ConvertingReactiveCassandraRepositoryTests extends AbstractKeyspace subscriber.assertValueCount(2); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void singleProjectedRxJavaQueryMethodShouldWork() { rx.observers.TestSubscriber subscriber = new rx.observers.TestSubscriber<>(); @@ -204,10 +183,7 @@ public class ConvertingReactiveCassandraRepositoryTests extends AbstractKeyspace assertThat(projectedPerson.getFirstname()).isEqualTo(carter.getFirstname()); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void observableRxJavaQueryMethodShouldWork() { rx.observers.TestSubscriber subscriber = new rx.observers.TestSubscriber<>(); @@ -220,10 +196,7 @@ public class ConvertingReactiveCassandraRepositoryTests extends AbstractKeyspace subscriber.assertValue(boyd); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void mixedRepositoryShouldWork() { Person value = reactiveRepository.findByLastname(boyd.getLastname()).toBlocking().value(); @@ -231,10 +204,7 @@ public class ConvertingReactiveCassandraRepositoryTests extends AbstractKeyspace assertThat(value).isEqualTo(boyd); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void shouldFindOneByPublisherOfLastName() { Person carter = reactiveRepository.findByLastname(Single.just(this.carter.getLastname())).block(); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ReactiveCassandraRepositoryIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ReactiveCassandraRepositoryIntegrationTests.java index ff07637d5..f26f432d4 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ReactiveCassandraRepositoryIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ReactiveCassandraRepositoryIntegrationTests.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. @@ -17,9 +17,11 @@ package org.springframework.data.cassandra.repository; import static org.assertj.core.api.Assertions.*; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + import java.util.Arrays; import java.util.List; -import java.util.stream.Collectors; import org.junit.Before; import org.junit.Test; @@ -49,9 +51,6 @@ import com.datastax.driver.core.KeyspaceMetadata; import com.datastax.driver.core.Session; import com.datastax.driver.core.TableMetadata; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - /** * Test for {@link ReactiveCassandraRepository} query methods. * @@ -123,10 +122,7 @@ public class ReactiveCassandraRepositoryIntegrationTests extends AbstractKeyspac repository.save(Arrays.asList(oliver, dave, carter, boyd)).last().block(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void shouldFindByLastName() { List list = repository.findByLastname("Matthews").collectList().block(); @@ -134,10 +130,7 @@ public class ReactiveCassandraRepositoryIntegrationTests extends AbstractKeyspac assertThat(list).hasSize(2).contains(dave, oliver); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void shouldFindOneByLastName() { Person carter = repository.findOneByLastname("Beauford").block(); @@ -145,10 +138,7 @@ public class ReactiveCassandraRepositoryIntegrationTests extends AbstractKeyspac assertThat(carter.getFirstname()).isEqualTo("Carter"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void shouldFindOneByPublisherOfLastName() { Person carter = repository.findByLastname(Mono.just("Beauford")).block(); @@ -156,10 +146,7 @@ public class ReactiveCassandraRepositoryIntegrationTests extends AbstractKeyspac assertThat(carter.getFirstname()).isEqualTo("Carter"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void shouldFindUsingPublishersInStringQuery() { List persons = repository.findStringQuery(Mono.just("Matthews")).collectList().block(); @@ -167,10 +154,7 @@ public class ReactiveCassandraRepositoryIntegrationTests extends AbstractKeyspac assertThat(persons).contains(dave); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void shouldFindByLastNameAndSort() { GroupKey key1 = new GroupKey("Simpsons", "hash", "Bart"); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/CassandraRepositoryConfigurationExtensionUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/CassandraRepositoryConfigurationExtensionUnitTests.java index 009f65e85..ce339953b 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/CassandraRepositoryConfigurationExtensionUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/CassandraRepositoryConfigurationExtensionUnitTests.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. @@ -54,26 +54,17 @@ public class CassandraRepositoryConfigurationExtensionUnitTests { extension = new CassandraRepositoryConfigurationExtension(); } - /** - * @see DATACASS-257 - */ - @Test + @Test // DATACASS-257 public void isStrictMatchIfDomainTypeIsAnnotatedWithTable() { assertHasRepo(SampleRepository.class, extension.getRepositoryConfigurations(configurationSource, loader, true)); } - /** - * @see DATACASS-257 - */ - @Test + @Test // DATACASS-257 public void isStrictMatchIfRepositoryExtendsStoreSpecificBase() { assertHasRepo(StoreRepository.class, extension.getRepositoryConfigurations(configurationSource, loader, true)); } - /** - * @see DATACASS-257 - */ - @Test + @Test // DATACASS-257 public void isNotStrictMatchIfDomainTypeIsNotAnnotatedWithTable() { assertDoesNotHaveRepo(UnannotatedRepository.class, diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/ReactiveCassandraRepositoriesRegistrarUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/ReactiveCassandraRepositoriesRegistrarUnitTests.java index ef6c12a6d..015c1ef0d 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/ReactiveCassandraRepositoriesRegistrarUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/ReactiveCassandraRepositoriesRegistrarUnitTests.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. @@ -15,11 +15,8 @@ */ package org.springframework.data.cassandra.repository.config; -import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; -import java.util.Arrays; - import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -60,10 +57,7 @@ public class ReactiveCassandraRepositoriesRegistrarUnitTests { @Autowired ReactivePersonRepository personRepository; @Autowired ApplicationContext context; - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void testConfiguration() {} static interface ReactivePersonRepository extends ReactiveCassandraRepository {} diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/ReactiveCassandraRepositoryConfigurationExtensionUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/ReactiveCassandraRepositoryConfigurationExtensionUnitTests.java index c340af888..8da5b1b7e 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/ReactiveCassandraRepositoryConfigurationExtensionUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/ReactiveCassandraRepositoryConfigurationExtensionUnitTests.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. @@ -55,26 +55,17 @@ public class ReactiveCassandraRepositoryConfigurationExtensionUnitTests { extension = new ReactiveCassandraRepositoryConfigurationExtension(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void isStrictMatchIfDomainTypeIsAnnotatedWithTable() { assertHasRepo(SampleRepository.class, extension.getRepositoryConfigurations(configurationSource, loader, true)); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void isStrictMatchIfRepositoryExtendsStoreSpecificBase() { assertHasRepo(StoreRepository.class, extension.getRepositoryConfigurations(configurationSource, loader, true)); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void isNotStrictMatchIfDomainTypeIsNotAnnotatedWithDocument() { assertDoesNotHaveRepo(UnannotatedRepository.class, diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/Address.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/Address.java index 67f0208ac..5dde4f14c 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/Address.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/Address.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/Contact.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/Contact.java index b3f1334e3..a412dbc05 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/Contact.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/Contact.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. @@ -15,15 +15,15 @@ */ package org.springframework.data.cassandra.repository.conversion; +import lombok.Data; +import lombok.NoArgsConstructor; + import java.util.List; import org.springframework.data.annotation.Id; import org.springframework.data.cassandra.mapping.CassandraType; import org.springframework.data.cassandra.mapping.Table; -import lombok.Data; -import lombok.NoArgsConstructor; - import com.datastax.driver.core.DataType.Name; /** @@ -39,11 +39,9 @@ class Contact { Address address; List
addresses; - @CassandraType(type = Name.UDT, userTypeName = "phone") - Phone mainPhone; + @CassandraType(type = Name.UDT, userTypeName = "phone") Phone mainPhone; - @CassandraType(type = Name.LIST,typeArguments = Name.UDT, userTypeName = "phone") - List alternativePhones; + @CassandraType(type = Name.LIST, typeArguments = Name.UDT, userTypeName = "phone") List alternativePhones; public Contact(String id) { this.id = id; diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/DerivedQueryMethodsParameterConversionIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/DerivedQueryMethodsParameterConversionIntegrationTests.java index 8ea5a3250..055572451 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/DerivedQueryMethodsParameterConversionIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/DerivedQueryMethodsParameterConversionIntegrationTests.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. @@ -41,10 +41,7 @@ public class DerivedQueryMethodsParameterConversionIntegrationTests extends Para @Autowired ContactRepository contactRepository; - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldFindByConvertedParameter() { List contacts = contactRepository.findByAddress(walter.getAddress()); @@ -52,10 +49,7 @@ public class DerivedQueryMethodsParameterConversionIntegrationTests extends Para assertThat(contacts).contains(walter, flynn); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldFindByStringParameter() { String parameter = AddressWriteConverter.INSTANCE.convert(walter.getAddress()); @@ -64,28 +58,19 @@ public class DerivedQueryMethodsParameterConversionIntegrationTests extends Para assertThat(contacts).contains(walter, flynn); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void findByAddressesIn() { assertThat(contactRepository.findByAddressesContains(flynn.address)).contains(flynn, walter); assertThat(contactRepository.findByAddressesContains(walter.addresses.get(1))).contains(walter); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void findByMainPhone() { assertThat(contactRepository.findByMainPhone(walter.getMainPhone())).contains(walter); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void findByMainPhoneUdtValue() { KeyspaceMetadata keyspace = adminOperations.getKeyspaceMetadata(); @@ -95,20 +80,14 @@ public class DerivedQueryMethodsParameterConversionIntegrationTests extends Para assertThat(contactRepository.findByMainPhone(udtValue)).contains(walter); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void findByAlternativePhones() { Phone phone = walter.getAlternativePhones().get(0); assertThat(contactRepository.findByAlternativePhonesContains(phone)).contains(walter); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void findByAlternativePhonesUdtValue() { Phone phone = walter.getAlternativePhones().get(0); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/ParameterConversionTestSupport.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/ParameterConversionTestSupport.java index a9bed3f62..36a0b9491 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/ParameterConversionTestSupport.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/ParameterConversionTestSupport.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. @@ -96,7 +96,8 @@ abstract class ParameterConversionTestSupport extends AbstractSpringDataEmbedded template.getCqlOperations().execute("CREATE INDEX IF NOT EXISTS contact_addresses ON contact (addresses);"); template.getCqlOperations().execute("CREATE INDEX IF NOT EXISTS contact_main_phones ON contact (mainphone);"); - template.getCqlOperations().execute("CREATE INDEX IF NOT EXISTS contact_alternative_phones ON contact (alternativephones);"); + template.getCqlOperations() + .execute("CREATE INDEX IF NOT EXISTS contact_alternative_phones ON contact (alternativephones);"); walter = new Contact("Walter"); walter.setAddress(new Address("Albuquerque", "USA")); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/Phone.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/Phone.java index 8c31a67a0..9315a62e7 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/Phone.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/Phone.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/StringQueryMethodsParameterConversionIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/StringQueryMethodsParameterConversionIntegrationTests.java index e8f51da68..bd7e75892 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/StringQueryMethodsParameterConversionIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/conversion/StringQueryMethodsParameterConversionIntegrationTests.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. @@ -42,10 +42,7 @@ public class StringQueryMethodsParameterConversionIntegrationTests extends Param @Autowired ContactStringQueryRepository contactRepository; - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldFindByConvertedParameter() { List contacts = contactRepository.findByAddress(walter.getAddress()); @@ -53,10 +50,7 @@ public class StringQueryMethodsParameterConversionIntegrationTests extends Param assertThat(contacts).contains(walter, flynn); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldFindByStringParameter() { String parameter = AddressWriteConverter.INSTANCE.convert(walter.getAddress()); @@ -65,28 +59,19 @@ public class StringQueryMethodsParameterConversionIntegrationTests extends Param assertThat(contacts).contains(walter, flynn); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void findByAddressesIn() { assertThat(contactRepository.findByAddressesContains(flynn.address)).contains(flynn, walter); assertThat(contactRepository.findByAddressesContains(walter.addresses.get(1))).contains(walter); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void findByMainPhone() { assertThat(contactRepository.findByMainPhone(walter.getMainPhone())).contains(walter); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void findByMainPhoneUdtValue() { KeyspaceMetadata keyspace = adminOperations.getKeyspaceMetadata(); @@ -96,20 +81,14 @@ public class StringQueryMethodsParameterConversionIntegrationTests extends Param assertThat(contactRepository.findByMainPhone(udtValue)).contains(walter); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void findByAlternativePhones() { Phone phone = walter.getAlternativePhones().get(0); assertThat(contactRepository.findByAlternativePhonesContains(phone)).contains(walter); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void findByAlternativePhonesUdtValue() { Phone phone = walter.getAlternativePhones().get(0); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/isolated/RepositoryQueryMethodParameterTypesIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/isolated/RepositoryQueryMethodParameterTypesIntegrationTests.java index cc794a25e..13992389e 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/isolated/RepositoryQueryMethodParameterTypesIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/isolated/RepositoryQueryMethodParameterTypesIntegrationTests.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. @@ -55,7 +55,6 @@ import com.datastax.driver.core.Session; * Integration tests for various query method parameter types. * * @author Mark Paluch - * @see DATACASS-296 */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration @@ -89,10 +88,7 @@ public class RepositoryQueryMethodParameterTypesIntegrationTests allPossibleTypesRepository.deleteAll(); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldFindByLocalDate() { session.execute("CREATE INDEX IF NOT EXISTS allpossibletypes_localdate ON allpossibletypes ( localdate )"); @@ -110,10 +106,7 @@ public class RepositoryQueryMethodParameterTypesIntegrationTests assertThat(result).contains(allPossibleTypes); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldFindByAnnotatedDateParameter() { CustomConversions customConversions = new CustomConversions( @@ -142,20 +135,13 @@ public class RepositoryQueryMethodParameterTypesIntegrationTests assertThat(result).contains(allPossibleTypes); } - /** - * @see DATACASS-296 - * @see DATACASS-304 - */ - @Test(expected = CassandraInvalidQueryException.class) + @Test(expected = CassandraInvalidQueryException.class) // DATACASS-296, DATACASS-304 public void shouldThrowExceptionUsingWrongMethodParameter() { session.execute("CREATE INDEX IF NOT EXISTS allpossibletypes_date ON allpossibletypes ( date )"); allPossibleTypesRepository.findWithDateParameter(Date.from(Instant.ofEpochSecond(44234123421L))); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldFindByZoneId() { ZoneId zoneId = ZoneId.of("Europe/Paris"); @@ -174,10 +160,7 @@ public class RepositoryQueryMethodParameterTypesIntegrationTests assertThat(result).contains(allPossibleTypes); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldFindByOptionalOfZoneId() { ZoneId zoneId = ZoneId.of("Europe/Paris"); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/isolated/RepositoryReturnTypesIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/isolated/RepositoryReturnTypesIntegrationTests.java index 92d1b5882..987c4d15c 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/isolated/RepositoryReturnTypesIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/isolated/RepositoryReturnTypesIntegrationTests.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. @@ -47,7 +47,6 @@ import com.datastax.driver.core.LocalDate; * Integration tests for various return types on a Cassandra repository. * * @author Mark Paluch - * @see DATACASS-271 */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration @@ -77,10 +76,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb allPossibleTypesRepository.deleteAll(); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnOptional() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -91,10 +87,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result.get()).isInstanceOf(AllPossibleTypes.class); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnList() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -105,10 +98,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).contains(entity); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnInetAddress() throws UnknownHostException { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -119,10 +109,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isEqualTo(entity.getInet()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnOptionalInetAddress() throws UnknownHostException { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -134,10 +121,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result.get()).isEqualTo(entity.getInet()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnBoxedByte() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -148,10 +132,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isEqualTo(entity.getBoxedByte()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnPrimitiveByte() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -162,10 +143,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isEqualTo(entity.getPrimitiveByte()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnBoxedShort() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -176,10 +154,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isEqualTo(entity.getBoxedShort()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnBoxedLong() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -190,10 +165,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isEqualTo(entity.getBoxedLong()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnBoxedInteger() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -204,10 +176,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isEqualTo(entity.getBoxedInteger()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnBoxedDouble() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -218,10 +187,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isEqualTo(entity.getBoxedDouble()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnBoxedDoubleFromInteger() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -232,10 +198,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isCloseTo(entity.getBoxedInteger(), offset(0.01d)); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnBoxedBoolean() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -246,10 +209,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isEqualTo(entity.getBoxedBoolean()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnDate() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -260,10 +220,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isEqualTo(entity.getDate()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnTimestamp() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -274,10 +231,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isEqualTo(entity.getTimestamp()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnBigDecimal() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -288,10 +242,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isEqualTo(entity.getBigDecimal()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnBigInteger() { AllPossibleTypes entity = new AllPossibleTypes("123"); @@ -302,10 +253,7 @@ public class RepositoryReturnTypesIntegrationTests extends AbstractSpringDataEmb assertThat(result).isEqualTo(entity.getBigInteger()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReturnEntityAsMap() { AllPossibleTypes entity = new AllPossibleTypes("123"); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraParametersParameterAccessorUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraParametersParameterAccessorUnitTests.java index e92a853fa..fbd43f1ea 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraParametersParameterAccessorUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraParametersParameterAccessorUnitTests.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. @@ -50,10 +50,7 @@ public class CassandraParametersParameterAccessorUnitTests { RepositoryMetadata metadata = new DefaultRepositoryMetadata(PossibleRepository.class); CassandraMappingContext context = new BasicCassandraMappingContext(); - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void returnsCassandraSimpleType() throws Exception { Method method = PossibleRepository.class.getMethod("findByFirstname", String.class); @@ -63,10 +60,7 @@ public class CassandraParametersParameterAccessorUnitTests { assertThat(accessor.getDataType(0)).isEqualTo(DataType.varchar()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReturnNoTypeForComplexTypes() throws Exception { Method method = PossibleRepository.class.getMethod("findByBpLocalDateTime", LocalDateTime.class); @@ -76,10 +70,7 @@ public class CassandraParametersParameterAccessorUnitTests { assertThat(accessor.getDataType(0)).isNull(); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void returnTypeForAnnotatedParameter() throws Exception { Method method = PossibleRepository.class.getMethod("findByAnnotatedBpLocalDateTime", LocalDateTime.class); @@ -89,10 +80,7 @@ public class CassandraParametersParameterAccessorUnitTests { assertThat(accessor.getDataType(0)).isEqualTo(DataType.date()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void returnTypeForAnnotatedParameterWhenUsingStringValue() throws Exception { Method method = PossibleRepository.class.getMethod("findByAnnotatedObject", Object.class); @@ -102,10 +90,7 @@ public class CassandraParametersParameterAccessorUnitTests { assertThat(accessor.getDataType(0)).isEqualTo(DataType.date()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void returnTypeForAnnotatedParameterWhenUsingNullValue() throws Exception { Method method = PossibleRepository.class.getMethod("findByAnnotatedObject", Object.class); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraParametersUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraParametersUnitTests.java index c9d4a1124..0cdf5c619 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraParametersUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraParametersUnitTests.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. @@ -40,10 +40,7 @@ public class CassandraParametersUnitTests { @Mock CassandraQueryMethod queryMethod; - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReturnUnknownDataTypeForSimpleType() throws Exception { Method method = PersonRepository.class.getMethod("findByFirstname", String.class); @@ -52,10 +49,7 @@ public class CassandraParametersUnitTests { assertThat(cassandraParameters.getParameter(0).getCassandraType()).isNull(); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReturnDataTypeForAnnotatedSimpleType() throws Exception { Method method = PersonRepository.class.getMethod("findByFirstTime", String.class); @@ -64,10 +58,7 @@ public class CassandraParametersUnitTests { assertThat(cassandraParameters.getParameter(0).getCassandraType().type()).isEqualTo(Name.TIME); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReturnNoTypeForComplexType() throws Exception { Method method = PersonRepository.class.getMethod("findByObject", Object.class); @@ -76,10 +67,7 @@ public class CassandraParametersUnitTests { assertThat(cassandraParameters.getParameter(0).getCassandraType()).isNull(); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReturnTypeForAnnotatedType() throws Exception { Method method = PersonRepository.class.getMethod("findByAnnotatedObject", Object.class); @@ -88,10 +76,7 @@ public class CassandraParametersUnitTests { assertThat(cassandraParameters.getParameter(0).getCassandraType().type()).isEqualTo(Name.TIME); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReturnTypeForComposedAnnotationType() throws Exception { Method method = PersonRepository.class.getMethod("findByComposedAnnotationObject", Object.class); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraQueryCreatorUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraQueryCreatorUnitTests.java index 9f070206d..38ef84680 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraQueryCreatorUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraQueryCreatorUnitTests.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. @@ -63,10 +63,7 @@ public class CassandraQueryCreatorUnitTests { converter = new MappingCassandraConverter(context); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsQueryCorrectly() { String query = createQuery("findByFirstname", Person.class, "Walter"); @@ -74,10 +71,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname='Walter';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsQueryWithSortCorrectly() { String query = createQuery("findByFirstnameOrderByLastname", Person.class, "Walter"); @@ -85,10 +79,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname='Walter' ORDER BY lastname ASC;"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsAndQueryCorrectly() { String query = createQuery("findByFirstnameAndLastname", Person.class, "Walter", "White"); @@ -96,26 +87,17 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname='Walter' AND lastname='White';"); } - /** - * @see DATACASS-7 - */ - @Test(expected = InvalidDataAccessApiUsageException.class) + @Test(expected = InvalidDataAccessApiUsageException.class) // DATACASS-7 public void rejectsNegatingQuery() { createQuery("findByFirstnameNot", Person.class, "Walter"); } - /** - * @see DATACASS-7 - */ - @Test(expected = InvalidDataAccessApiUsageException.class) + @Test(expected = InvalidDataAccessApiUsageException.class) // DATACASS-7 public void rejectsOrQuery() { createQuery("findByFirstnameOrLastname", Person.class, "Walter", "White"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsGreaterThanQueryCorrectly() { String query = createQuery("findByFirstnameGreaterThan", Person.class, "Walter"); @@ -123,10 +105,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname>'Walter';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsGreaterThanEqualQueryCorrectly() { String query = createQuery("findByFirstnameGreaterThanEqual", Person.class, "Walter"); @@ -134,10 +113,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname>='Walter';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsLessThanQueryCorrectly() { String query = createQuery("findByFirstnameLessThan", Person.class, "Walter"); @@ -145,10 +121,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname<'Walter';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsLessThanEqualQueryCorrectly() { String query = createQuery("findByFirstnameLessThanEqual", Person.class, "Walter"); @@ -156,10 +129,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname<='Walter';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsInQueryCorrectly() { String query = createQuery("findByFirstnameIn", Person.class, "Walter"); @@ -167,10 +137,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname IN ('Walter');"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsInQueryWithListCorrectly() { String query = createQuery("findByFirstnameIn", Person.class, Arrays.asList("Walter", "Gus")); @@ -178,10 +145,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname IN ('Walter','Gus');"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsInQueryWithArrayCorrectly() { String query = createQuery("findByFirstnameInAndLastname", Person.class, new String[] { "Walter", "Gus" }, "Fring"); @@ -189,10 +153,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname IN ('Walter','Gus') AND lastname='Fring';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsLikeQueryCorrectly() { assertThat(createQuery("findByFirstnameLike", Person.class, "Wal%ter")) @@ -202,10 +163,7 @@ public class CassandraQueryCreatorUnitTests { .isEqualTo("SELECT * FROM person WHERE firstname LIKE 'Walter';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsStartsWithQueryCorrectly() { String query = createQuery("findByFirstnameStartsWith", Person.class, "Walter"); @@ -213,10 +171,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname LIKE 'Walter%';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsEndsWithQueryCorrectly() { String query = createQuery("findByFirstnameEndsWith", Person.class, "Walter"); @@ -224,10 +179,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname LIKE '%Walter';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsContainsQueryOnSimplePropertyCorrectly() { String query = createQuery("findByFirstnameContains", Person.class, "Walter"); @@ -235,10 +187,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname LIKE '%Walter%';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsContainsQueryOnSetPropertyCorrectly() { String query = createQuery("findByMysetContains", TypeWithSet.class, "Walter"); @@ -246,10 +195,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM typewithset WHERE myset CONTAINS 'Walter';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsContainsQueryOnListPropertyCorrectly() { String query = createQuery("findByMylistContains", TypeWithList.class, "Walter"); @@ -257,10 +203,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM typewithlist WHERE mylist CONTAINS 'Walter';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsContainsQueryOnMapPropertyCorrectly() { String query = createQuery("findByMymapContains", TypeWithMap.class, "Walter"); @@ -268,10 +211,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM typewithmap WHERE mymap CONTAINS 'Walter';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsIsTrueQueryCorrectly() { String query = createQuery("findByFirstnameIsTrue", Person.class, "Walter"); @@ -279,10 +219,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname=true;"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsIsFalseQueryCorrectly() { String query = createQuery("findByFirstnameIsFalse", Person.class, "Walter"); @@ -290,10 +227,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname=false;"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsQueryUsingQuotingCorrectly() { String query = createQuery("findByIdAndSet", QuotedType.class, "Walter", "White"); @@ -301,10 +235,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM \"myTable\" WHERE \"my_id\"='Walter' AND \"set\"='White';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsFindByPrimaryKeyPartCorrectly() { String query = createQuery("findByKeyFirstname", TypeWithCompositeId.class, "Walter"); @@ -312,10 +243,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM typewithcompositeid WHERE firstname='Walter';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsFindByPrimaryKeyPartWithSortCorrectly() { String query = createQuery("findByKeyFirstnameOrderByKeyLastnameAsc", TypeWithCompositeId.class, "Walter"); @@ -323,10 +251,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM typewithcompositeid WHERE firstname='Walter' ORDER BY lastname ASC;"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsFindByPrimaryKeyPartOfPrimaryKeyClassCorrectly() { String query = createQuery("findByFirstname", Key.class, "Walter"); @@ -335,10 +260,7 @@ public class CassandraQueryCreatorUnitTests { assertThat(query).isEqualTo("SELECT * FROM key WHERE firstname='Walter';"); } - /** - * @see DATACASS-7 - */ - @Test(expected = IllegalStateException.class) + @Test(expected = IllegalStateException.class) // DATACASS-7 public void createsFindByPrimaryKey2PartCorrectly() { createQuery("findByKey", TypeWithCompositeId.class, new Key()); } diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraQueryMethodUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraQueryMethodUnitTests.java index f571f2a35..ae85a7072 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraQueryMethodUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/CassandraQueryMethodUnitTests.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. @@ -44,10 +44,7 @@ public class CassandraQueryMethodUnitTests { context = new BasicCassandraMappingContext(); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void detectsCollectionFromRepoTypeIfReturnTypeNotAssignable() throws Exception { CassandraQueryMethod queryMethod = queryMethod(SampleRepository.class, "method"); @@ -57,10 +54,7 @@ public class CassandraQueryMethodUnitTests { assertThat(metadata.getTableName().toCql()).isEqualTo("person"); } - /** - * @see DATACASS-7 - */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) // DATACASS-7 public void rejectsNullMappingContext() throws Exception { Method method = SampleRepository.class.getMethod("method"); @@ -69,10 +63,7 @@ public class CassandraQueryMethodUnitTests { new SpelAwareProxyProjectionFactory(), null); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void considersMethodAsCollectionQuery() throws Exception { CassandraQueryMethod queryMethod = queryMethod(SampleRepository.class, "method"); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ConvertingParameterAccessorUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ConvertingParameterAccessorUnitTests.java index bce769913..3e3887415 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ConvertingParameterAccessorUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ConvertingParameterAccessorUnitTests.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. @@ -47,11 +47,9 @@ import com.datastax.driver.core.DataType; @RunWith(MockitoJUnitRunner.class) public class ConvertingParameterAccessorUnitTests { - @Mock - CassandraParameterAccessor mockParameterAccessor; + @Mock CassandraParameterAccessor mockParameterAccessor; - @Mock - CassandraPersistentProperty mockProperty; + @Mock CassandraPersistentProperty mockProperty; ConvertingParameterAccessor convertingParameterAccessor; @@ -65,10 +63,7 @@ public class ConvertingParameterAccessorUnitTests { this.convertingParameterAccessor = new ConvertingParameterAccessor(converter, mockParameterAccessor); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReturnNullBindableValue() { ConvertingParameterAccessor accessor = new ConvertingParameterAccessor(converter, mockParameterAccessor); @@ -76,10 +71,7 @@ public class ConvertingParameterAccessorUnitTests { assertThat(accessor.getBindableValue(0)).isNull(); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 @SuppressWarnings({ "rawtypes", "unchecked" }) public void shouldReturnNativeBindableValue() { @@ -95,10 +87,7 @@ public class ConvertingParameterAccessorUnitTests { assertThat(accessor.getBindableValue(0)).isEqualTo((Object) "hello"); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 @SuppressWarnings({ "rawtypes", "unchecked" }) public void shouldReturnConvertedBindableValue() { @@ -111,11 +100,7 @@ public class ConvertingParameterAccessorUnitTests { .isEqualTo(com.datastax.driver.core.LocalDate.fromYearMonthDay(2010, 7, 4)); } - /** - * @see DATACASS-296 - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-296, DATACASS-7 public void shouldReturnDataTypeProvidedByDelegate() { when(mockParameterAccessor.getDataType(0)).thenReturn(DataType.varchar()); @@ -123,11 +108,7 @@ public class ConvertingParameterAccessorUnitTests { assertThat(convertingParameterAccessor.getDataType(0)).isEqualTo(DataType.varchar()); } - /** - * @see DATACASS-296 - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-296, DATACASS-7 @SuppressWarnings({ "rawtypes", "unchecked" }) public void shouldConvertCollections() { @@ -147,10 +128,7 @@ public class ConvertingParameterAccessorUnitTests { assertThat(list.get(0)).isInstanceOf(com.datastax.driver.core.LocalDate.class); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 @SuppressWarnings({ "rawtypes", "unchecked" }) public void shouldProvideTypeBasedOnValue() { @@ -160,10 +138,7 @@ public class ConvertingParameterAccessorUnitTests { assertThat(convertingParameterAccessor.getDataType(0)).isEqualTo(DataType.date()); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 @SuppressWarnings({ "rawtypes", "unchecked" }) public void shouldProvideTypeBasedOnPropertyType() { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ParameterBindingParserUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ParameterBindingParserUnitTests.java index fd937388b..f114988b7 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ParameterBindingParserUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ParameterBindingParserUnitTests.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. @@ -31,10 +31,7 @@ import org.springframework.data.cassandra.repository.query.StringBasedQuery.Para */ public class ParameterBindingParserUnitTests { - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void parseWithoutParameters() { String query = "SELECT * FROM hello_world"; @@ -47,10 +44,7 @@ public class ParameterBindingParserUnitTests { assertThat(bindings).isEmpty(); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void parseWithStaticParameters() { String query = "SELECT * FROM hello_world WHERE a = 1 AND b = {'list'} AND c = {'key':'value'}"; @@ -63,10 +57,7 @@ public class ParameterBindingParserUnitTests { assertThat(bindings).isEmpty(); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void parseWithPositionalParameters() { String query = "SELECT * FROM hello_world WHERE a = ?0 and b = ?13"; @@ -82,10 +73,7 @@ public class ParameterBindingParserUnitTests { assertThat(bindings.get(1).getParameterIndex()).isEqualTo(13); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void parseWithNamedParameters() { String query = "SELECT * FROM hello_world WHERE a = :hello and b = :world"; @@ -98,10 +86,7 @@ public class ParameterBindingParserUnitTests { assertThat(bindings).hasSize(2); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void parseWithIndexExpressionParameters() { String query = "SELECT * FROM hello_world WHERE a = ?#{[0]} and b = ?#{[2]}"; @@ -114,10 +99,7 @@ public class ParameterBindingParserUnitTests { assertThat(bindings).hasSize(2); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void parseWithNameExpressionParameters() { String query = "SELECT * FROM hello_world WHERE a = :#{#a} and b = :#{#b}"; @@ -130,10 +112,7 @@ public class ParameterBindingParserUnitTests { assertThat(bindings).hasSize(2); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void parseWithMixedParameters() { String query = "SELECT * FROM hello_world WHERE (a = ?1 and b = :name) and c = (:#{#a}) and (d = ?#{[1]})"; diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/PartTreeCassandraQueryUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/PartTreeCassandraQueryUnitTests.java index a5a8b707f..e211e2160 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/PartTreeCassandraQueryUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/PartTreeCassandraQueryUnitTests.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. @@ -79,50 +79,35 @@ public class PartTreeCassandraQueryUnitTests { when(userTypeMock.iterator()).thenReturn(Collections. emptyIterator()); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldDeriveSimpleQuery() { String query = deriveQueryFromMethod("findByLastname", "foo"); assertThat(query).isEqualTo("SELECT * FROM person WHERE lastname='foo';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldDeriveSimpleQueryWithoutNames() { String query = deriveQueryFromMethod("findPersonBy"); assertThat(query).isEqualTo("SELECT * FROM person;"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldDeriveAndQuery() { String query = deriveQueryFromMethod("findByFirstnameAndLastname", "foo", "bar"); assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname='foo' AND lastname='bar';"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void usesDynamicProjection() { String query = deriveQueryFromMethod("findDynamicallyProjectedBy", PersonProjection.class); assertThat(query).isEqualTo("SELECT * FROM person;"); } - /** - * @see DATACASS-357 - */ - @Test + @Test // DATACASS-357 public void shouldDeriveFieldInCollectionQuery() { String query = deriveQueryFromMethod("findByFirstnameIn", new Class[] { Collection.class }, Arrays.asList("Hank", "Walter")); @@ -130,10 +115,7 @@ public class PartTreeCassandraQueryUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname IN ('Hank','Walter');"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldDeriveSimpleQueryWithMappedUDT() { when(userTypeResolverMock.resolveType(CqlIdentifier.cqlId("address"))).thenReturn(userTypeMock); @@ -144,10 +126,7 @@ public class PartTreeCassandraQueryUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE mainaddress={};"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldDeriveSimpleQueryWithUDTValue() { when(userTypeResolverMock.resolveType(CqlIdentifier.cqlId("address"))).thenReturn(userTypeMock); @@ -158,10 +137,7 @@ public class PartTreeCassandraQueryUnitTests { assertThat(query).isEqualTo("SELECT * FROM person WHERE mainaddress={};"); } - /** - * @see DATACASS-357 - */ - @Test + @Test // DATACASS-357 public void shouldDeriveUdtInCollectionQuery() { when(userTypeResolverMock.resolveType(CqlIdentifier.cqlId("address"))).thenReturn(userTypeMock); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactiveCassandraParameterAccessorUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactiveCassandraParameterAccessorUnitTests.java index e07269a34..289860acc 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactiveCassandraParameterAccessorUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactiveCassandraParameterAccessorUnitTests.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. @@ -17,6 +17,10 @@ package org.springframework.data.cassandra.repository.query; import static org.assertj.core.api.Assertions.*; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import rx.Single; + import java.lang.reflect.Method; import org.junit.Test; @@ -36,10 +40,6 @@ import org.threeten.bp.LocalDateTime; import com.datastax.driver.core.DataType; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; -import rx.Single; - /** * Unit tests for {@link ReactiveCassandraParameterAccessor}. * @@ -57,10 +57,7 @@ public class ReactiveCassandraParameterAccessorUnitTests { RepositoryMetadata metadata = new DefaultRepositoryMetadata(PossibleRepository.class); CassandraMappingContext context = new BasicCassandraMappingContext(); - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void returnsCassandraSimpleType() throws Exception { Method method = PossibleRepository.class.getMethod("findByFirstname", Flux.class); @@ -70,10 +67,7 @@ public class ReactiveCassandraParameterAccessorUnitTests { assertThat(accessor.getDataType(0)).isEqualTo(DataType.varchar()); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void shouldReturnNoTypeForComplexTypes() throws Exception { Method method = PossibleRepository.class.getMethod("findByLocalDateTime", Mono.class); @@ -84,10 +78,7 @@ public class ReactiveCassandraParameterAccessorUnitTests { } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void returnTypeForAnnotatedParameter() throws Exception { Method method = PossibleRepository.class.getMethod("findByAnnotatedByLocalDateTime", Single.class); @@ -97,10 +88,7 @@ public class ReactiveCassandraParameterAccessorUnitTests { assertThat(accessor.getDataType(0)).isEqualTo(DataType.date()); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void returnTypeForAnnotatedParameterWhenUsingStringValue() throws Exception { Method method = PossibleRepository.class.getMethod("findByAnnotatedObject", Mono.class); @@ -110,10 +98,7 @@ public class ReactiveCassandraParameterAccessorUnitTests { assertThat(accessor.getDataType(0)).isEqualTo(DataType.date()); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void returnTypeForAnnotatedParameterWhenUsingNullValue() throws Exception { Method method = PossibleRepository.class.getMethod("findByAnnotatedObject", Mono.class); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactiveCassandraQueryMethodUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactiveCassandraQueryMethodUnitTests.java index a3b423bd8..94a26569e 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactiveCassandraQueryMethodUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactiveCassandraQueryMethodUnitTests.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. @@ -17,6 +17,10 @@ package org.springframework.data.cassandra.repository.query; import static org.assertj.core.api.Assertions.*; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import rx.Single; + import java.lang.reflect.Method; import org.junit.Before; @@ -29,10 +33,6 @@ import org.springframework.data.projection.SpelAwareProxyProjectionFactory; import org.springframework.data.repository.Repository; import org.springframework.data.repository.core.support.DefaultRepositoryMetadata; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; -import rx.Single; - /** * Unit tests for {@link ReactiveCassandraQueryMethod}. * @@ -47,10 +47,7 @@ public class ReactiveCassandraQueryMethodUnitTests { context = new BasicCassandraMappingContext(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void considersMethodAsStreamQuery() throws Exception { ReactiveCassandraQueryMethod queryMethod = queryMethod(SampleRepository.class, "method"); @@ -58,10 +55,7 @@ public class ReactiveCassandraQueryMethodUnitTests { assertThat(queryMethod.isStreamQuery()).isTrue(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void considersMethodAsCollectionQuery() throws Exception { ReactiveCassandraQueryMethod queryMethod = queryMethod(SampleRepository.class, "method"); @@ -69,10 +63,7 @@ public class ReactiveCassandraQueryMethodUnitTests { assertThat(queryMethod.isCollectionQuery()).isTrue(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void considersMonoMethodAsEntityQuery() throws Exception { ReactiveCassandraQueryMethod queryMethod = queryMethod(SampleRepository.class, "mono"); @@ -81,10 +72,7 @@ public class ReactiveCassandraQueryMethodUnitTests { assertThat(queryMethod.isQueryForEntity()).isTrue(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void considersSingleMethodAsEntityQuery() throws Exception { ReactiveCassandraQueryMethod queryMethod = queryMethod(SampleRepository.class, "single"); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactivePartTreeCassandraQueryUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactivePartTreeCassandraQueryUnitTests.java index b908bea67..22632a1e4 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactivePartTreeCassandraQueryUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactivePartTreeCassandraQueryUnitTests.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. @@ -18,6 +18,10 @@ package org.springframework.data.cassandra.repository.query; import static org.assertj.core.api.Assertions.*; import static org.mockito.Mockito.*; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import rx.Single; + import java.lang.reflect.Method; import org.junit.Before; @@ -39,10 +43,6 @@ import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.projection.SpelAwareProxyProjectionFactory; import org.springframework.data.repository.core.support.DefaultRepositoryMetadata; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; -import rx.Single; - /** * Unit tests for {@link ReactivePartTreeCassandraQuery}. * @@ -66,40 +66,28 @@ public class ReactivePartTreeCassandraQueryUnitTests { when(mockCassandraOperations.getConverter()).thenReturn(converter); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void shouldDeriveSimpleQuery() { String query = deriveQueryFromMethod("findByLastname", "foo"); assertThat(query).isEqualTo("SELECT * FROM person WHERE lastname='foo';"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void shouldDeriveSimpleQueryWithoutNames() { String query = deriveQueryFromMethod("findPersonBy"); assertThat(query).isEqualTo("SELECT * FROM person;"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void shouldDeriveAndQuery() { String query = deriveQueryFromMethod("findByFirstnameAndLastname", "foo", "bar"); assertThat(query).isEqualTo("SELECT * FROM person WHERE firstname='foo' AND lastname='bar';"); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void usesDynamicProjection() { String query = deriveQueryFromMethod("findDynamicallyProjectedBy", PersonProjection.class); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactiveStringBasedCassandraQueryUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactiveStringBasedCassandraQueryUnitTests.java index 4a7315568..2e156c9c0 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactiveStringBasedCassandraQueryUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/ReactiveStringBasedCassandraQueryUnitTests.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. @@ -87,10 +87,7 @@ public class ReactiveStringBasedCassandraQueryUnitTests { this.converter.afterPropertiesSet(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void bindsSimplePropertyCorrectly() throws Exception { ReactiveStringBasedCassandraQuery cassandraQuery = getQueryMethod("findByLastname", String.class); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/StringBasedCassandraQueryUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/StringBasedCassandraQueryUnitTests.java index adde08180..cdac3a559 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/StringBasedCassandraQueryUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/StringBasedCassandraQueryUnitTests.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,7 +34,6 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import org.springframework.cassandra.core.CqlOperations; -import org.springframework.cassandra.core.ReactiveSessionCallback; import org.springframework.cassandra.core.SessionCallback; import org.springframework.cassandra.core.cql.CqlIdentifier; import org.springframework.data.cassandra.convert.MappingCassandraConverter; @@ -112,10 +111,7 @@ public class StringBasedCassandraQueryUnitTests { this.converter.afterPropertiesSet(); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsIndexParameterCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByLastname", String.class); @@ -127,10 +123,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE lastname = 'Matthews';"); } - /** - * @see DATACASS-259 - */ - @Test + @Test // DATACASS-259 public void bindsIndexParameterForComposedQueryAnnotationCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByComposedQueryAnnotation", String.class); @@ -142,10 +135,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE lastname = 'Matthews';"); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsAndEscapesIndexParameterCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByLastname", String.class); @@ -157,10 +147,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE lastname = 'Mat\th''ew\"s';"); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsAndEscapesBytesIndexParameterCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByLastname", String.class); @@ -172,10 +159,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE lastname = 0x01020304;"); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsIndexParameterInListCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByLastNameIn", Collection.class); @@ -187,10 +171,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE lastname IN ('White','Heisenberg');"); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsIndexParameterIsListCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByLastNamesAndAge", Collection.class, int.class); @@ -202,10 +183,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE lastnames = ['White','Heisenberg'] AND age = 42;"); } - /** - * @see DATACASS-117 - */ - @Test(expected = QueryCreationException.class) + @Test(expected = QueryCreationException.class) // DATACASS-117 public void referencingUnknownIndexedParameterShouldFail() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByOutOfBoundsLastNameShouldFail", String.class); @@ -215,10 +193,7 @@ public class StringBasedCassandraQueryUnitTests { cassandraQuery.createQuery(accessor); } - /** - * @see DATACASS-117 - */ - @Test(expected = QueryCreationException.class) + @Test(expected = QueryCreationException.class) // DATACASS-117 public void referencingUnknownNamedParameterShouldFail() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByUnknownParameterLastNameShouldFail", String.class); @@ -228,10 +203,7 @@ public class StringBasedCassandraQueryUnitTests { cassandraQuery.createQuery(accessor); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsIndexParameterInSetCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByLastNameIn", Collection.class); @@ -243,10 +215,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE lastname IN ('White','Heisenberg');"); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsNamedParameterCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByNamedParameter", String.class, String.class); @@ -258,10 +227,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE lastname = 'Matthews';"); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsIndexExpressionParameterCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByIndexExpressionParameter", String.class); @@ -273,10 +239,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE lastname = 'Matthews';"); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsExpressionParameterCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByExpressionParameter", String.class); @@ -288,10 +251,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE lastname = 'Matthews';"); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsConditionalExpressionParameterCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByConditionalExpressionParameter", String.class); @@ -309,10 +269,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE lastname = 'Walter';"); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsReusedParametersCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByLastnameUsedTwice", String.class); @@ -324,10 +281,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE lastname='Matthews' or firstname = 'Matthews';"); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsMultipleParametersCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByLastnameAndFirstname", String.class, String.class); @@ -344,10 +298,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo(expected.getQueryString()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void bindsConvertedParameterCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByCreatedDate", LocalDate.class); @@ -359,10 +310,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(actual).isEqualTo("SELECT * FROM person WHERE createdDate='2010-07-04';"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void bindsMappedUdtPropertyCorrectly() throws Exception { Field city = createField("city", DataType.varchar()); @@ -382,10 +330,7 @@ public class StringBasedCassandraQueryUnitTests { assertThat(stringQuery).isEqualTo("SELECT * FROM person WHERE address={city:NULL,country:NULL};"); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void bindsUdtValuePropertyCorrectly() throws Exception { Field city = createField("city", DataType.varchar()); @@ -404,7 +349,7 @@ public class StringBasedCassandraQueryUnitTests { } private StringBasedCassandraQuery getQueryMethod(String name, Class... args) { - + Method method = ReflectionUtils.findMethod(SampleRepository.class, name, args); CassandraQueryMethod queryMethod = new CassandraQueryMethod(method, metadata, factory, converter.getMappingContext()); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/StubParameterAccessor.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/StubParameterAccessor.java index 54b0f712e..4f7f04e6c 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/StubParameterAccessor.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/StubParameterAccessor.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/BasicMapIdUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/BasicMapIdUnitTests.java index e236dd993..784edbf61 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/BasicMapIdUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/BasicMapIdUnitTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/CassandraRepositoryFactoryUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/CassandraRepositoryFactoryUnitTests.java index bad0b2989..25201cd07 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/CassandraRepositoryFactoryUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/CassandraRepositoryFactoryUnitTests.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. @@ -56,10 +56,7 @@ public class CassandraRepositoryFactoryUnitTests { when(converter.getMappingContext()).thenReturn(mappingContext); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void usesMappingCassandraEntityInformationIfMappingContextSet() { when(mappingContext.getPersistentEntity(Person.class)).thenReturn(entity); when(entity.getType()).thenReturn(Person.class); @@ -72,10 +69,7 @@ public class CassandraRepositoryFactoryUnitTests { assertThat(entityInformation).isInstanceOf(MappingCassandraEntityInformation.class); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void createsRepositoryWithIdTypeLong() { when(mappingContext.getPersistentEntity(Person.class)).thenReturn(entity); when(entity.getType()).thenReturn(Person.class); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/MapIdFactoryUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/MapIdFactoryUnitTests.java index 1a17fd80e..9428519fc 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/MapIdFactoryUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/MapIdFactoryUnitTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/ReactiveCassandraRepositoryFactoryUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/ReactiveCassandraRepositoryFactoryUnitTests.java index 035b187e2..b4835f95f 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/ReactiveCassandraRepositoryFactoryUnitTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/ReactiveCassandraRepositoryFactoryUnitTests.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. @@ -53,10 +53,7 @@ public class ReactiveCassandraRepositoryFactoryUnitTests { when(converter.getMappingContext()).thenReturn(mappingContext); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void usesMappingCassandraEntityInformationIfMappingContextSet() { when(mappingContext.getPersistentEntity(Person.class)).thenReturn(entity); @@ -70,10 +67,7 @@ public class ReactiveCassandraRepositoryFactoryUnitTests { assertThat(entityInformation).isInstanceOf(MappingCassandraEntityInformation.class); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void createsRepositoryWithIdTypeLong() { when(mappingContext.getPersistentEntity(Person.class)).thenReturn(entity); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/SimpleReactiveCassandraRepositoryIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/SimpleReactiveCassandraRepositoryIntegrationTests.java index 65016e417..e24967f08 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/SimpleReactiveCassandraRepositoryIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/SimpleReactiveCassandraRepositoryIntegrationTests.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. @@ -17,6 +17,10 @@ package org.springframework.data.cassandra.repository.support; import static org.assertj.core.api.Assertions.*; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.TestSubscriber; + import java.util.Arrays; import java.util.List; @@ -38,10 +42,6 @@ import org.springframework.data.repository.query.DefaultEvaluationContextProvide import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; -import reactor.test.TestSubscriber; - /** * Integration tests for {@link SimpleReactiveCassandraRepository}. * @@ -101,10 +101,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK repository.save(Arrays.asList(oliver, dave, carter, boyd)).last().block(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void existsByIdShouldReturnTrueForExistingObject() { Boolean exists = repository.exists(dave.getId()).block(); @@ -112,10 +109,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK assertThat(exists).isTrue(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void existsByIdShouldReturnFalseForAbsentObject() { TestSubscriber testSubscriber = TestSubscriber.subscribe(repository.exists("unknown")); @@ -123,20 +117,14 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK testSubscriber.await().assertComplete().assertValues(false).assertNoError(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void existsByMonoOfIdShouldReturnTrueForExistingObject() { Boolean exists = repository.exists(Mono.just(dave.getId())).block(); assertThat(exists).isTrue(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void existsByEmptyMonoOfIdShouldReturnEmptyMono() { TestSubscriber testSubscriber = TestSubscriber.subscribe(repository.exists(Mono.empty())); @@ -144,10 +132,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK testSubscriber.await().assertComplete().assertNoValues().assertNoError(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void findOneShouldReturnObject() { Person person = repository.findOne(dave.getId()).block(); @@ -155,10 +140,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK assertThat(person).isEqualTo(dave); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void findOneShouldCompleteWithoutValueForAbsentObject() { TestSubscriber testSubscriber = TestSubscriber.subscribe(repository.findOne("unknown")); @@ -166,10 +148,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK testSubscriber.await().assertComplete().assertNoValues().assertNoError(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void findOneByMonoOfIdShouldReturnTrueForExistingObject() { Person person = repository.findOne(Mono.just(dave.getId())).block(); @@ -177,10 +156,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK assertThat(person).isEqualTo(dave); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void findOneByEmptyMonoOfIdShouldReturnEmptyMono() { TestSubscriber testSubscriber = TestSubscriber.subscribe(repository.findOne(Mono.empty())); @@ -188,10 +164,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK testSubscriber.await().assertComplete().assertNoValues().assertNoError(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void findAllShouldReturnAllResults() { List persons = repository.findAll().collectList().block(); @@ -199,10 +172,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK assertThat(persons).hasSize(4); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void findAllByIterableOfIdShouldReturnResults() { List persons = repository.findAll(Arrays.asList(dave.getId(), boyd.getId())).collectList().block(); @@ -210,10 +180,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK assertThat(persons).hasSize(2); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void findAllByPublisherOfIdShouldReturnResults() { List persons = repository.findAll(Flux.just(dave.getId(), boyd.getId())).collectList().block(); @@ -221,10 +188,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK assertThat(persons).hasSize(2); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void findAllByEmptyPublisherOfIdShouldReturnResults() { TestSubscriber testSubscriber = TestSubscriber.subscribe(repository.findAll(Flux.empty())); @@ -232,10 +196,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK testSubscriber.await().assertComplete().assertNoValues().assertNoError(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void countShouldReturnNumberOfRecords() { TestSubscriber testSubscriber = TestSubscriber.subscribe(repository.count()); @@ -243,10 +204,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK testSubscriber.await().assertComplete().assertValueCount(1).assertValues(4L).assertNoError(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void insertEntityShouldInsertEntity() { repository.deleteAll().block(); @@ -259,10 +217,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK repository.findAll().count().subscribeWith(TestSubscriber.create()).awaitAndAssertNextValues(1L); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void insertShouldDeferredWrite() { repository.deleteAll().block(); @@ -274,10 +229,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK repository.findAll().count().subscribeWith(TestSubscriber.create()).awaitAndAssertNextValues(0L); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void insertIterableOfEntitiesShouldInsertEntity() { repository.deleteAll().block(); @@ -290,10 +242,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK repository.findAll().count().subscribeWith(TestSubscriber.create()).awaitAndAssertNextValues(3L); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void insertPublisherOfEntitiesShouldInsertEntity() { repository.deleteAll().block(); @@ -304,10 +253,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK repository.findAll().count().subscribeWith(TestSubscriber.create()).awaitAndAssertNextValues(3L); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void saveEntityShouldUpdateExistingEntity() { dave.setFirstname("Hello, Dave"); @@ -323,10 +269,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK assertThat(loaded.getLastname()).isEqualTo(dave.getLastname()); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void saveEntityShouldInsertNewEntity() { Person person = new Person("36", "Homer", "Simpson"); @@ -340,10 +283,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK assertThat(loaded).isEqualTo(person); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void saveIterableOfNewEntitiesShouldInsertEntity() { repository.deleteAll().block(); @@ -356,10 +296,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK repository.findAll().count().subscribeWith(TestSubscriber.create()).awaitAndAssertNextValues(3L); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void saveIterableOfMixedEntitiesShouldInsertEntity() { Person person = new Person("36", "Homer", "Simpson"); @@ -378,10 +315,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK assertThat(persistentHomer).isEqualTo(person); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void savePublisherOfEntitiesShouldInsertEntity() { repository.deleteAll().block(); @@ -392,10 +326,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK repository.findAll().count().subscribeWith(TestSubscriber.create()).awaitAndAssertNextValues(3L); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void deleteAllShouldRemoveEntities() { repository.deleteAll().block(); @@ -405,10 +336,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK testSubscriber.await().assertComplete().assertValueCount(0); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void deleteByIdShouldRemoveEntity() { TestSubscriber testSubscriber = TestSubscriber.subscribe(repository.delete(dave.getId())); @@ -420,10 +348,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK verificationSubscriber.await().assertComplete().assertNoValues(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void deleteShouldRemoveEntity() { TestSubscriber testSubscriber = TestSubscriber.subscribe(repository.delete(dave)); @@ -435,10 +360,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK verificationSubscriber.await().assertComplete().assertNoValues(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void deleteIterableOfEntitiesShouldRemoveEntities() { TestSubscriber testSubscriber = TestSubscriber.subscribe(repository.delete(Arrays.asList(dave, boyd))); @@ -449,10 +371,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK verificationSubscriber.await().assertComplete().assertNoValues(); } - /** - * @see DATACASS-335 - */ - @Test + @Test // DATACASS-335 public void deletePublisherOfEntitiesShouldRemoveEntities() { TestSubscriber testSubscriber = TestSubscriber.subscribe(repository.delete(Flux.just(dave, boyd))); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/collections/CollectionsRowValueProviderIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/collections/CollectionsRowValueProviderIntegrationTests.java index 530d7934c..2760d273c 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/collections/CollectionsRowValueProviderIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/collections/CollectionsRowValueProviderIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2014 the original author or authors. + * Copyright 2011-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Comment.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Comment.java index e49ab100f..a602e9355 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Comment.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Comment.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentKey.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentKey.java index b99d431d4..5aa119db1 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentKey.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentKey.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepository.java index e7b593062..1e6d43de7 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepositoryIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepositoryIntegrationTests.java index 41a22f850..b6e89cd52 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepositoryIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepositoryJavaConfigIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepositoryJavaConfigIntegrationTests.java index 6ebed34be..d2d798f6b 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepositoryJavaConfigIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepositoryJavaConfigIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepositoryXmlConfigIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepositoryXmlConfigIntegrationTests.java index 492a95832..4a410cdd3 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepositoryXmlConfigIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/CommentRepositoryXmlConfigIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Notification.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Notification.java index ccbd952c6..fb24f5dd1 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Notification.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Notification.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/NotificationPK.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/NotificationPK.java index d667074c4..622dcc818 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/NotificationPK.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/NotificationPK.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Post.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Post.java index 67ec8ebf5..9c6ec571d 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Post.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Post.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/PostPK.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/PostPK.java index ce05c50b9..35cc895fe 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/PostPK.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/PostPK.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Timeline.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Timeline.java index 801860d25..25eed6644 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Timeline.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/Timeline.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/TimelinePK.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/TimelinePK.java index bfb470872..feb5d2913 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/TimelinePK.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/composites/TimelinePK.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/CompositeKeyCrudIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/CompositeKeyCrudIntegrationTests.java index 4949b6f57..1f0ba71ed 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/CompositeKeyCrudIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/CompositeKeyCrudIntegrationTests.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. @@ -17,7 +17,6 @@ package org.springframework.data.cassandra.test.integration.forcequote.composite import static org.assertj.core.api.Assertions.*; -import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/Explicit.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/Explicit.java index e262dcfe6..a61e7c257 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/Explicit.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/Explicit.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ExplicitKey.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ExplicitKey.java index df317f60a..de899ee18 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ExplicitKey.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ExplicitKey.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ExplicitRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ExplicitRepository.java index 60811f52f..1f84341ff 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ExplicitRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ExplicitRepository.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryIntegrationTestsDelegator.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryIntegrationTestsDelegator.java index a38644ff1..f9c844a3f 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryIntegrationTestsDelegator.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryIntegrationTestsDelegator.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryJavaConfigIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryJavaConfigIntegrationTests.java index 2a1b8d9ad..cf62e360c 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryJavaConfigIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryJavaConfigIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryTests.java index 4c7963902..e611fa0ae 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryTests.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. @@ -38,8 +38,8 @@ public class ForceQuotedCompositePrimaryKeyRepositoryTests { String keyOneColumnName, String keyOne) { return cassandraTemplate.getCqlOperations() - .queryForObject(String.format("select %s from %s where %s = '%s' and %s = '%s'", columnName, - tableName, keyZeroColumnName, keyZero, keyOneColumnName, keyOne), String.class); + .queryForObject(String.format("select %s from %s where %s = '%s' and %s = '%s'", columnName, tableName, + keyZeroColumnName, keyZero, keyOneColumnName, keyOne), String.class); } public void testImplicit() { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryXmlConfigIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryXmlConfigIntegrationTests.java index 19a93b768..9122d1696 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryXmlConfigIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ForceQuotedCompositePrimaryKeyRepositoryXmlConfigIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/Implicit.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/Implicit.java index 78d0d6b2e..4898bee15 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/Implicit.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/Implicit.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ImplicitKey.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ImplicitKey.java index 71a1ba905..dcd0961bd 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ImplicitKey.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ImplicitKey.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ImplicitRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ImplicitRepository.java index bf2ace3ac..c14b1c561 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ImplicitRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/ImplicitRepository.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/entity/CorrelationEntity.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/entity/CorrelationEntity.java index c9b2255b8..e4ee22944 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/entity/CorrelationEntity.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/compositeprimarykey/entity/CorrelationEntity.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/Explicit.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/Explicit.java index cabd11351..41a831dc4 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/Explicit.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/Explicit.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ExplicitProperties.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ExplicitProperties.java index f1cc7c69a..2d830aff0 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ExplicitProperties.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ExplicitProperties.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ExplicitPropertiesRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ExplicitPropertiesRepository.java index 327083f9b..2d8b503f1 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ExplicitPropertiesRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ExplicitPropertiesRepository.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ExplicitRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ExplicitRepository.java index e31b8b3b1..0f80a863f 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ExplicitRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ExplicitRepository.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryIntegrationTests.java index cf767727c..688b6d438 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryJavaConfigIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryJavaConfigIntegrationTests.java index 1e6024461..1ecaaa8f6 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryJavaConfigIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryJavaConfigIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryTests.java index d65e8c591..6f546dd1c 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryXmlConfigIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryXmlConfigIntegrationTests.java index 46d32f0ba..86f234fd2 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryXmlConfigIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ForceQuotedRepositoryXmlConfigIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/Implicit.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/Implicit.java index 2e2c58c60..58c9d6283 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/Implicit.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/Implicit.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ImplicitProperties.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ImplicitProperties.java index 04c0454a9..687174c9f 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ImplicitProperties.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ImplicitProperties.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ImplicitPropertiesRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ImplicitPropertiesRepository.java index a6e3f99f6..cefaf3538 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ImplicitPropertiesRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ImplicitPropertiesRepository.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ImplicitRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ImplicitRepository.java index 6f8dfd8d0..a7856541b 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ImplicitRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/forcequote/config/ImplicitRepository.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/customconversion/CustomConversionTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/customconversion/CustomConversionTests.java index 75e48f4ad..605cbe31c 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/customconversion/CustomConversionTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/customconversion/CustomConversionTests.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. @@ -17,6 +17,10 @@ package org.springframework.data.cassandra.test.integration.mapping.customconver import static org.assertj.core.api.Assertions.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -41,10 +45,6 @@ import org.springframework.util.StringUtils; import com.datastax.driver.core.Row; import com.datastax.driver.core.querybuilder.QueryBuilder; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - /** * Test suite for applying {@link CustomConversions} to * {@link org.springframework.data.cassandra.mapping.BasicCassandraMappingContext}. @@ -77,10 +77,7 @@ public class CustomConversionTests extends AbstractKeyspaceCreatingIntegrationTe SchemaTestUtils.truncate(Employee.class, cassandraOperations); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldInsertCustomConvertedObject() { Employee employee = new Employee(); @@ -95,10 +92,7 @@ public class CustomConversionTests extends AbstractKeyspaceCreatingIntegrationTe assertThat(row.getString("person")).contains("\"firstname\":\"Homer\""); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldUpdateCustomConvertedObject() { Employee employee = new Employee(); @@ -115,10 +109,7 @@ public class CustomConversionTests extends AbstractKeyspaceCreatingIntegrationTe assertThat(row.getString("person")).contains("\"firstname\":\"Homer\""); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldInsertCustomConvertedObjectWithCollections() { Employee employee = new Employee(); @@ -139,10 +130,7 @@ public class CustomConversionTests extends AbstractKeyspaceCreatingIntegrationTe assertThat(row.getSet("people", String.class)).hasSize(1); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldUpdateCustomConvertedObjectWithCollections() { Employee employee = new Employee(); @@ -162,15 +150,11 @@ public class CustomConversionTests extends AbstractKeyspaceCreatingIntegrationTe assertThat(row.getSet("people", String.class)).hasSize(1); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldLoadCustomConvertedObject() { cassandraOperations.getCqlOperations().execute(QueryBuilder.insertInto("employee").value("id", "employee-id") - .value("person", - "{\"firstname\":\"Homer\",\"lastname\":\"Simpson\"}")); + .value("person", "{\"firstname\":\"Homer\",\"lastname\":\"Simpson\"}")); Employee employee = cassandraOperations.selectOne(QueryBuilder.select("id", "person").from("employee"), Employee.class); @@ -181,15 +165,11 @@ public class CustomConversionTests extends AbstractKeyspaceCreatingIntegrationTe assertThat(employee.getPerson().getLastname()).isEqualTo("Simpson"); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldLoadCustomConvertedWithCollectionsObject() { cassandraOperations.getCqlOperations().execute(QueryBuilder.insertInto("employee").value("id", "employee-id") - .value("people", - Collections.singleton("{\"firstname\":\"Apu\",\"lastname\":\"Nahasapeemapetilon\"}"))); + .value("people", Collections.singleton("{\"firstname\":\"Apu\",\"lastname\":\"Nahasapeemapetilon\"}"))); Employee employee = cassandraOperations.selectOne(QueryBuilder.select("id", "people").from("employee"), Employee.class); @@ -201,10 +181,7 @@ public class CustomConversionTests extends AbstractKeyspaceCreatingIntegrationTe assertThat(apu.getFirstname()).isEqualTo("Apu"); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void dummy() { cassandraOperations.getCqlOperations().execute(QueryBuilder.insertInto("employee").value("id", "employee-id")); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/proxy/CassandraTemplateMapIdProxyDelegateIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/proxy/CassandraTemplateMapIdProxyDelegateIntegrationTests.java index 503745868..8f8a4a3ca 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/proxy/CassandraTemplateMapIdProxyDelegateIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/proxy/CassandraTemplateMapIdProxyDelegateIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/MultiPrimaryKeyColumns.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/MultiPrimaryKeyColumns.java index ade1ae1a2..1e9ba3a21 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/MultiPrimaryKeyColumns.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/MultiPrimaryKeyColumns.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/MultiPrimaryKeyColumnsRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/MultiPrimaryKeyColumnsRepository.java index b70cc7250..1393fa867 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/MultiPrimaryKeyColumnsRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/MultiPrimaryKeyColumnsRepository.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/RepositoryMapIdIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/RepositoryMapIdIntegrationTests.java index 66dbca1e1..2eafee50a 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/RepositoryMapIdIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/RepositoryMapIdIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/SinglePrimaryKecColumnRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/SinglePrimaryKecColumnRepository.java index ba4cf89b8..2bbb0ff67 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/SinglePrimaryKecColumnRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/SinglePrimaryKecColumnRepository.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/SinglePrimaryKeyColumn.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/SinglePrimaryKeyColumn.java index 5dd8e6e33..b2e24a60c 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/SinglePrimaryKeyColumn.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/repo/SinglePrimaryKeyColumn.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/template/CassandraTemplateMapIdIntegrationTest.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/template/CassandraTemplateMapIdIntegrationTest.java index a9849a197..fea8ae405 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/template/CassandraTemplateMapIdIntegrationTest.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/mapid/template/CassandraTemplateMapIdIntegrationTest.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/types/CassandraTypeMappingIntegrationTest.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/types/CassandraTypeMappingIntegrationTest.java index 4249a76ef..e7f716e5f 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/types/CassandraTypeMappingIntegrationTest.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/types/CassandraTypeMappingIntegrationTest.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. @@ -28,20 +28,17 @@ import java.util.HashMap; import java.util.HashSet; import java.util.UUID; -import com.datastax.driver.core.SimpleStatement; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.springframework.cassandra.test.integration.AbstractKeyspaceCreatingIntegrationTest; -import org.springframework.data.cassandra.convert.MappingCassandraConverter; import org.springframework.data.cassandra.core.CassandraOperations; import org.springframework.data.cassandra.core.CassandraTemplate; import org.springframework.data.cassandra.domain.AllPossibleTypes; import org.springframework.data.cassandra.test.integration.support.SchemaTestUtils; -import com.datastax.driver.core.BoundStatement; import com.datastax.driver.core.LocalDate; -import com.datastax.driver.core.PreparedStatement; +import com.datastax.driver.core.SimpleStatement; /** * Integration tests for type mapping using {@link CassandraOperations}. @@ -66,10 +63,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin SchemaTestUtils.truncate(TimeEntity.class, operations); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteInetAddress() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -81,10 +75,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getInet()).isEqualTo(entity.getInet()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteUUID() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -96,10 +87,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getUuid()).isEqualTo(entity.getUuid()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteBoxedShort() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -111,10 +99,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBoxedShort()).isEqualTo(entity.getBoxedShort()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWritePrimitiveShort() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -126,10 +111,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getPrimitiveShort()).isEqualTo(entity.getPrimitiveShort()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReadAndWriteBoxedByte() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -141,10 +123,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBoxedByte()).isEqualTo(entity.getBoxedByte()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReadAndWritePrimitiveByte() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -156,10 +135,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getPrimitiveByte()).isEqualTo(entity.getPrimitiveByte()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteBoxedLong() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -171,10 +147,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBoxedLong()).isEqualTo(entity.getBoxedLong()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWritePrimitiveLong() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -186,10 +159,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getPrimitiveLong()).isEqualTo(entity.getPrimitiveLong()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteBoxedInteger() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -201,10 +171,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBoxedInteger()).isEqualTo(entity.getBoxedInteger()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWritePrimitiveInteger() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -216,10 +183,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getPrimitiveInteger()).isEqualTo(entity.getPrimitiveInteger()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteBoxedFloat() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -231,10 +195,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBoxedFloat()).isEqualTo(entity.getBoxedFloat()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWritePrimitiveFloat() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -246,10 +207,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getPrimitiveFloat()).isEqualTo(entity.getPrimitiveFloat()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteBoxedDouble() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -261,10 +219,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBoxedDouble()).isEqualTo(entity.getBoxedDouble()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWritePrimitiveDouble() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -276,10 +231,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getPrimitiveDouble()).isEqualTo(entity.getPrimitiveDouble()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteBoxedBoolean() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -291,10 +243,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBoxedBoolean()).isEqualTo(entity.getBoxedBoolean()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWritePrimitiveBoolean() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -306,11 +255,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.isPrimitiveBoolean()).isEqualTo(entity.isPrimitiveBoolean()); } - /** - * @see DATACASS-280 - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-280, DATACASS-271 public void shouldReadAndWriteTimestamp() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -322,10 +267,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getTimestamp()).isEqualTo(entity.getTimestamp()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReadAndWriteDate() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -337,10 +279,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getDate()).isEqualTo(entity.getDate()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteBigInteger() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -352,10 +291,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBigInteger()).isEqualTo(entity.getBigInteger()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteBigDecimal() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -367,10 +303,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBigDecimal()).isEqualTo(entity.getBigDecimal()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteBlob() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -385,10 +318,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(new String(bytes)).isEqualTo("Hello"); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteSetOfString() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -400,10 +330,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getSetOfString()).isEqualTo(entity.getSetOfString()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteEmptySetOfString() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -415,10 +342,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getSetOfString()).isNull(); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteListOfString() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -430,10 +354,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getListOfString()).isEqualTo(entity.getListOfString()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteEmptyListOfString() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -445,10 +366,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getListOfString()).isNull(); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteMapOfString() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -460,10 +378,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getMapOfString()).isEqualTo(entity.getMapOfString()); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteEmptyMapOfString() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -475,10 +390,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getMapOfString()).isNull(); } - /** - * @see DATACASS-280 - */ - @Test + @Test // DATACASS-280 public void shouldReadAndWriteEnum() { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -490,10 +402,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getAnEnum()).isEqualTo(entity.getAnEnum()); } - /** - * @see DATACASS-271 - */ - @Test + @Test // DATACASS-271 public void shouldReadAndWriteTime() { // writing of time is not supported with Insert/Update statements as they mix up types. @@ -509,10 +418,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getTime()).isEqualTo(time); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteLocalDate() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -524,10 +430,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getLocalDate()).isEqualTo(entity.getLocalDate()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteLocalDateTime() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -539,10 +442,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getLocalDateTime()).isEqualTo(entity.getLocalDateTime()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteLocalTime() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -554,10 +454,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getLocalTime()).isEqualTo(entity.getLocalTime()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteInstant() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -569,10 +466,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getInstant()).isEqualTo(entity.getInstant()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteZoneId() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -584,10 +478,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getZoneId()).isEqualTo(entity.getZoneId()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteJodaLocalDate() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -599,10 +490,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getJodaLocalDate()).isEqualTo(entity.getJodaLocalDate()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteJodaDateMidnight() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -614,10 +502,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getJodaDateMidnight()).isEqualTo(entity.getJodaDateMidnight()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteJodaDateTime() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -629,10 +514,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getJodaDateTime()).isEqualTo(entity.getJodaDateTime()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteBpLocalDate() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -644,10 +526,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBpLocalDate()).isEqualTo(entity.getBpLocalDate()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteBpLocalDateTime() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -659,10 +538,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBpLocalDateTime()).isEqualTo(entity.getBpLocalDateTime()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteBpLocalTime() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -674,10 +550,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBpLocalTime()).isEqualTo(entity.getBpLocalTime()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteBpInstant() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -689,10 +562,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBpZoneId()).isEqualTo(entity.getBpZoneId()); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldReadAndWriteBpZoneId() throws Exception { AllPossibleTypes entity = new AllPossibleTypes("1"); @@ -704,10 +574,7 @@ public class CassandraTypeMappingIntegrationTest extends AbstractKeyspaceCreatin assertThat(loaded.getBpZoneId()).isEqualTo(entity.getBpZoneId()); } - /** - * @see DATACASS-285 - */ - @Test + @Test // DATACASS-285 @Ignore("Counter columns are not supported with Spring Data Cassandra as the value of counter columns can only be incremented/decremented, not set") public void shouldReadAndWriteCounter() { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/types/CounterEntity.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/types/CounterEntity.java index bf30a2277..9bbcae339 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/types/CounterEntity.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/types/CounterEntity.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. @@ -15,17 +15,17 @@ */ package org.springframework.data.cassandra.test.integration.mapping.types; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.NonNull; +import lombok.RequiredArgsConstructor; + import org.springframework.data.cassandra.mapping.CassandraType; import org.springframework.data.cassandra.mapping.PrimaryKey; import org.springframework.data.cassandra.mapping.Table; import com.datastax.driver.core.DataType.Name; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.NonNull; -import lombok.RequiredArgsConstructor; - /** * @author Mark Paluch */ diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/types/TimeEntity.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/types/TimeEntity.java index 0251987bf..627d52758 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/types/TimeEntity.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/mapping/types/TimeEntity.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. @@ -15,17 +15,17 @@ */ package org.springframework.data.cassandra.test.integration.mapping.types; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.NonNull; +import lombok.RequiredArgsConstructor; + import org.springframework.data.cassandra.mapping.CassandraType; import org.springframework.data.cassandra.mapping.PrimaryKey; import org.springframework.data.cassandra.mapping.Table; import com.datastax.driver.core.DataType.Name; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.NonNull; -import lombok.RequiredArgsConstructor; - /** * @author Mark Paluch */ diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/minimal/config/AbsoluteMinimumXmlConfigIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/minimal/config/AbsoluteMinimumXmlConfigIntegrationTests.java index 085281c93..6ab8dc89b 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/minimal/config/AbsoluteMinimumXmlConfigIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/minimal/config/AbsoluteMinimumXmlConfigIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/minimal/config/entities/AbsMin.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/minimal/config/entities/AbsMin.java index 7642eecd1..e9c20d860 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/minimal/config/entities/AbsMin.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/minimal/config/entities/AbsMin.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/minimal/config/entities/AbsMinRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/minimal/config/entities/AbsMinRepository.java index 6c5172298..2d0a4679a 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/minimal/config/entities/AbsMinRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/minimal/config/entities/AbsMinRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CassandraOperationsProducer.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CassandraOperationsProducer.java index 4da97e867..3e241db21 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CassandraOperationsProducer.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CassandraOperationsProducer.java @@ -17,15 +17,12 @@ package org.springframework.data.cassandra.test.integration.repository.cdi; import java.util.Collections; import java.util.Set; + import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Disposes; import javax.enterprise.inject.Produces; import javax.inject.Singleton; -import com.datastax.driver.core.Cluster; -import com.google.common.collect.Sets; -import com.google.common.util.concurrent.Service; - import org.springframework.cassandra.core.cql.generator.CreateKeyspaceCqlGenerator; import org.springframework.cassandra.core.cql.generator.DropKeyspaceCqlGenerator; import org.springframework.cassandra.core.keyspace.CreateKeyspaceSpecification; @@ -42,6 +39,10 @@ import org.springframework.data.cassandra.mapping.CassandraPersistentEntity; import org.springframework.data.cassandra.mapping.SimpleUserTypeResolver; import org.springframework.data.cassandra.test.integration.repository.simple.User; +import com.datastax.driver.core.Cluster; +import com.google.common.collect.Sets; +import com.google.common.util.concurrent.Service; + /** * @author Mark Paluch */ @@ -54,8 +55,8 @@ class CassandraOperationsProducer { public Cluster createCluster() throws Exception { CassandraConnectionProperties properties = new CassandraConnectionProperties(); - return Cluster.builder().addContactPoint(properties.getCassandraHost()) - .withPort(properties.getCassandraPort()).build(); + return Cluster.builder().addContactPoint(properties.getCassandraHost()).withPort(properties.getCassandraPort()) + .build(); } @Produces diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CdiRepositoryClient.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CdiRepositoryClient.java index 9bab22403..f034200ee 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CdiRepositoryClient.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CdiRepositoryClient.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CdiRepositoryTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CdiRepositoryTests.java index ad75ad59c..177c4228e 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CdiRepositoryTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CdiRepositoryTests.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. @@ -65,10 +65,7 @@ public class CdiRepositoryTests extends AbstractEmbeddedCassandraIntegrationTest qualifiedUserRepository = client.getQualifiedUserRepository(); } - /** - * @see DATACASS-149 - */ - @Test + @Test // DATACASS-149 public void testCdiRepository() { assertThat(repository).isNotNull(); @@ -101,10 +98,7 @@ public class CdiRepositoryTests extends AbstractEmbeddedCassandraIntegrationTest assertThat(retrieved).isNull(); } - /** - * @see DATACASS-249 - */ - @Test + @Test // DATACASS-249 public void testQualifiedCdiRepository() { assertThat(qualifiedUserRepository).isNotNull(); @@ -120,10 +114,7 @@ public class CdiRepositoryTests extends AbstractEmbeddedCassandraIntegrationTest assertThat(qualifiedUserRepository.exists(bean.getUsername())).isTrue(); } - /** - * @see DATACASS-149 - */ - @Test + @Test // DATACASS-149 public void returnOneFromCustomImpl() { assertThat(personRepository.returnOne()).isEqualTo(1); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CdiUserRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CdiUserRepository.java index 0f735ede1..105807d07 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CdiUserRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/CdiUserRepository.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/OtherQualifier.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/OtherQualifier.java index c6434becb..e0a84c97c 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/OtherQualifier.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/OtherQualifier.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. @@ -25,7 +25,6 @@ import javax.inject.Qualifier; /** * @author Mark Paluch - * @see DATACASS-249 */ @Qualifier @Retention(RetentionPolicy.RUNTIME) diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/QualifiedUserRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/QualifiedUserRepository.java index d2e50256a..6b9276292 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/QualifiedUserRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/QualifiedUserRepository.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. @@ -21,7 +21,6 @@ import org.springframework.data.repository.CrudRepository; /** * @author Mark Paluch - * @see DATACASS-249 */ @OtherQualifier @UserDB diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/SamplePersonRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/SamplePersonRepository.java index 515051797..b262291ca 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/SamplePersonRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/SamplePersonRepository.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. @@ -21,7 +21,6 @@ import org.springframework.data.repository.Repository; /** * @author Mark Paluch - * @see DATACASS-149 */ public interface SamplePersonRepository extends Repository, SamplePersonRepositoryCustom { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/SamplePersonRepositoryCustom.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/SamplePersonRepositoryCustom.java index 7bf719820..ff0847f7a 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/SamplePersonRepositoryCustom.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/SamplePersonRepositoryCustom.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. @@ -17,7 +17,6 @@ package org.springframework.data.cassandra.test.integration.repository.cdi; /** - * @see DATACASS-149 * @author Mark Paluch */ interface SamplePersonRepositoryCustom { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/SamplePersonRepositoryImpl.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/SamplePersonRepositoryImpl.java index f5b5b94eb..bbbbdb0e4 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/SamplePersonRepositoryImpl.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/SamplePersonRepositoryImpl.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. @@ -17,7 +17,6 @@ package org.springframework.data.cassandra.test.integration.repository.cdi; /** - * @see DATACASS-149 * @author Mark Paluch */ class SamplePersonRepositoryImpl implements SamplePersonRepositoryCustom { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/UserDB.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/UserDB.java index ad3a71b5c..306280e72 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/UserDB.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/cdi/UserDB.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. @@ -25,7 +25,6 @@ import javax.inject.Qualifier; /** * @author Mark Paluch - * @see DATACASS-249 */ @Qualifier @Retention(RetentionPolicy.RUNTIME) diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/bigintparam/BigIntParamIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/bigintparam/BigIntParamIntegrationTests.java index cc20f3258..ff574264c 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/bigintparam/BigIntParamIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/bigintparam/BigIntParamIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/bigintparam/BigThing.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/bigintparam/BigThing.java index fd7a47934..b0dfac936 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/bigintparam/BigThing.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/bigintparam/BigThing.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/bigintparam/BigThingRepo.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/bigintparam/BigThingRepo.java index 7ffee3f9e..2205bff32 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/bigintparam/BigThingRepo.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/bigintparam/BigThingRepo.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/datekey/DateKeyIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/datekey/DateKeyIntegrationTests.java index a321ca005..19e7d95e1 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/datekey/DateKeyIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/datekey/DateKeyIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/datekey/DateThing.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/datekey/DateThing.java index 55b3aed23..faf710c29 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/datekey/DateThing.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/datekey/DateThing.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/datekey/DateThingRepo.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/datekey/DateThingRepo.java index f276ded4b..7ab5dd1fa 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/datekey/DateThingRepo.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/datekey/DateThingRepo.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/Address.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/Address.java index 7c6478a1f..56e48c920 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/Address.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/Address.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/Person.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/Person.java index bf758f632..574e38351 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/Person.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/Person.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. @@ -15,6 +15,9 @@ */ package org.springframework.data.cassandra.test.integration.repository.querymethods.declared; +import lombok.Data; +import lombok.NoArgsConstructor; + import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; @@ -24,9 +27,6 @@ import org.springframework.cassandra.core.PrimaryKeyType; import org.springframework.data.cassandra.mapping.PrimaryKeyColumn; import org.springframework.data.cassandra.mapping.Table; -import lombok.Data; -import lombok.NoArgsConstructor; - /** * Sample domain class. * diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/QueryIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/QueryIntegrationTests.java index 66f022113..4f9b195c3 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/QueryIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/QueryIntegrationTests.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. @@ -305,10 +305,7 @@ public abstract class QueryIntegrationTests extends AbstractSpringDataEmbeddedCa assertThat(optional.isPresent()).isFalse(); } - /** - * @see https://jira.spring.io/browse/DATACASS-297 - */ - @Test + @Test // DATACASS-297 public void streamShouldReturnEntities() { for (int i = 0; i < 100; i++) { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/anno/PersonRepositoryWithQueryAnnotations.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/anno/PersonRepositoryWithQueryAnnotations.java index 65596ccb8..fa92daae1 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/anno/PersonRepositoryWithQueryAnnotations.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/anno/PersonRepositoryWithQueryAnnotations.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/anno/QueryAnnotationIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/anno/QueryAnnotationIntegrationTests.java index bae242a5f..1d8e80870 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/anno/QueryAnnotationIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/anno/QueryAnnotationIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/base/PersonRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/base/PersonRepository.java index cab8d9604..91540e5ff 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/base/PersonRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/base/PersonRepository.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/named/NamedQueryIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/named/NamedQueryIntegrationTests.java index 3ea8ba907..ba23f518d 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/named/NamedQueryIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/named/NamedQueryIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/named/PersonRepositoryWithNamedQueries.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/named/PersonRepositoryWithNamedQueries.java index 17283103b..d420b2899 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/named/PersonRepositoryWithNamedQueries.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/declared/named/PersonRepositoryWithNamedQueries.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/derived/PersonRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/derived/PersonRepository.java index 3792c1c1f..90a40f9e8 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/derived/PersonRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/derived/PersonRepository.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/derived/QueryDerivationIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/derived/QueryDerivationIntegrationTests.java index c9ae260c8..c2962113d 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/derived/QueryDerivationIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/derived/QueryDerivationIntegrationTests.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. @@ -15,8 +15,8 @@ */ package org.springframework.data.cassandra.test.integration.repository.querymethods.derived; -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assume.assumeTrue; +import static org.assertj.core.api.Assertions.*; +import static org.junit.Assume.*; import java.time.LocalDate; import java.util.Arrays; @@ -28,7 +28,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; -import org.springframework.core.SpringVersion; import org.springframework.data.cassandra.config.SchemaAction; import org.springframework.data.cassandra.core.CassandraOperations; import org.springframework.data.cassandra.repository.config.EnableCassandraRepositories; @@ -99,10 +98,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC cassandraVersion = CassandraVersion.get(session); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldFindByLastname() { List result = personRepository.findByLastname("White"); @@ -110,10 +106,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).contains(walter, skyler, flynn); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldFindByLastnameAndDynamicSort() { List result = personRepository.findByLastname("White", new Sort("firstname")); @@ -121,10 +114,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).contains(flynn, skyler, walter); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldFindByLastnameWithOrdering() { List result = personRepository.findByLastnameOrderByFirstnameAsc("White"); @@ -132,10 +122,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).contains(flynn, skyler, walter); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldFindByFirstnameAndLastname() { Person result = personRepository.findByFirstnameAndLastname("Walter", "White"); @@ -143,10 +130,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).isEqualTo(walter); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldFindByMappedUdt() throws InterruptedException { template.getCqlOperations().execute("CREATE INDEX IF NOT EXISTS person_main_address ON person (mainaddress);"); @@ -159,10 +143,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).isEqualTo(walter); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldFindByMappedUdtStringQuery() throws InterruptedException { template.getCqlOperations().execute("CREATE INDEX IF NOT EXISTS person_main_address ON person (mainaddress);"); @@ -175,34 +156,25 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).isEqualTo(walter); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void executesCollectionQueryWithProjection() { Collection collection = personRepository.findPersonProjectedBy(); - assertThat(collection).hasSize(3).extracting("firstname").contains( - flynn.getFirstname(), skyler.getFirstname(), walter.getFirstname()); + assertThat(collection).hasSize(3).extracting("firstname").contains(flynn.getFirstname(), skyler.getFirstname(), + walter.getFirstname()); } - /** - * @see DATACASS-359 - */ - @Test + @Test // DATACASS-359 public void executesCollectionQueryWithDtoProjection() { Collection collection = personRepository.findPersonDtoBy(); - assertThat(collection).hasSize(3).extracting("firstname").contains( - flynn.getFirstname(), skyler.getFirstname(), walter.getFirstname()); + assertThat(collection).hasSize(3).extracting("firstname").contains(flynn.getFirstname(), skyler.getFirstname(), + walter.getFirstname()); } - /** - * @see DATACASS-359 - */ - @Test + @Test // DATACASS-359 public void executesCollectionQueryWithDtoDynamicallyProjected() throws Exception { assumeTrue(cassandraVersion.isGreaterThanOrEqualTo(Version.parse("3.4"))); @@ -222,10 +194,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(heisenberg.lastname).isEqualTo("White"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldFindByNumberOfChildren() throws Exception { template.getCqlOperations() @@ -239,10 +208,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).isEqualTo(walter); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldFindByLocalDate() throws InterruptedException { template.getCqlOperations().execute("CREATE INDEX IF NOT EXISTS person_created_date ON person (createddate);"); @@ -258,10 +224,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).isEqualTo(walter); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldUseQueryOverride() { Person otherWalter = new Person("Walter", "Black"); @@ -273,10 +236,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).hasSize(1); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldUseStartsWithQuery() throws InterruptedException { assumeTrue(cassandraVersion.isGreaterThanOrEqualTo(Version.parse("3.4"))); @@ -293,10 +253,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(personRepository.findByNicknameStartsWith("Heis")).isEqualTo(walter); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldUseContainsQuery() throws InterruptedException { assumeTrue(cassandraVersion.isGreaterThanOrEqualTo(Version.parse("3.4"))); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/intparam/IntParamIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/intparam/IntParamIntegrationTests.java index 8d8d8126b..ec624ded0 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/intparam/IntParamIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/intparam/IntParamIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/intparam/IntThing.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/intparam/IntThing.java index 8cd223509..12c30e853 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/intparam/IntThing.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/intparam/IntThing.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/intparam/IntThingRepo.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/intparam/IntThingRepo.java index 018b0c138..ff7d73178 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/intparam/IntThingRepo.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/querymethods/intparam/IntThingRepo.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/AddressType.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/AddressType.java index 555c864d0..ced192b3d 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/AddressType.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/AddressType.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/User.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/User.java index 5aaa1111d..6598a6613 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/User.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/User.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepository.java index 0d736d235..cf0e759cd 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepository.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. @@ -17,8 +17,6 @@ package org.springframework.data.cassandra.test.integration.repository.simple; import org.springframework.data.cassandra.repository.TypedIdCassandraRepository; -import com.datastax.driver.core.UDTValue; - /** * Sample repository managing {@link User} entities. * diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryIntegrationTests.java index c4751ba80..747ffd9ac 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryIntegrationTests.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. @@ -21,7 +21,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; -import org.junit.Assert; import org.springframework.data.cassandra.core.CassandraOperations; import com.google.common.collect.Lists; @@ -114,8 +113,7 @@ public class UserRepositoryIntegrationTests { public void findsUserById() throws Exception { User user = repository.findOne(tom.getUsername()); - assertThat(user).isNotNull().isEqualTo(tom); - + assertThat(user).isNotNull().isEqualTo(tom); } @@ -166,9 +164,7 @@ public class UserRepositoryIntegrationTests { assertThat(repository.exists(id)).isFalse(); } - /** - * @see DATACASS-182 - */ + // DATACASS-182 public void save() { tom.setPassword(null); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryIntegrationTestsDelegator.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryIntegrationTestsDelegator.java index 366d3200f..be7db52e4 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryIntegrationTestsDelegator.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryIntegrationTestsDelegator.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. @@ -83,10 +83,7 @@ public abstract class UserRepositoryIntegrationTestsDelegator tests.exists(); } - /** - * @see DATACASS-182 - */ - @Test + @Test // DATACASS-182 public void save() { tests.save(); } diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryJavaConfigCustomRepositoryBaseClassIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryJavaConfigCustomRepositoryBaseClassIntegrationTests.java index 0c30424d1..be7c9418a 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryJavaConfigCustomRepositoryBaseClassIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryJavaConfigCustomRepositoryBaseClassIntegrationTests.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. @@ -52,10 +52,7 @@ public class UserRepositoryJavaConfigCustomRepositoryBaseClassIntegrationTests } } - /** - * @see DATACASS-211 - */ - @Test + @Test // DATACASS-211 public void targetRepositoryClassShouldBeConfiguredCustomBaseRepositoryClass() throws Exception { assertThat(((Advised) repository).getTargetSource().getTarget()).isInstanceOf(CustomCassandraRepository.class); } diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryJavaConfigIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryJavaConfigIntegrationTests.java index 7ad5607c3..ba2ab85d6 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryJavaConfigIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryJavaConfigIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryXmlConfigIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryXmlConfigIntegrationTests.java index b315e7085..6bda784e5 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryXmlConfigIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/repository/simple/UserRepositoryXmlConfigIntegrationTests.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/Book.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/Book.java index f533f1dc0..3c5e35fc5 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/Book.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/Book.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors + * Copyright 2013-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. @@ -15,14 +15,14 @@ */ package org.springframework.data.cassandra.test.integration.simpletons; +import lombok.Data; +import lombok.NoArgsConstructor; + import java.util.Date; import org.springframework.data.cassandra.mapping.PrimaryKey; import org.springframework.data.cassandra.mapping.Table; -import lombok.Data; -import lombok.NoArgsConstructor; - /** * Test POJO * diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/BookCondition.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/BookCondition.java index 5c722d304..adc47b5f7 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/BookCondition.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/BookCondition.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/BookHistory.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/BookHistory.java index c64411f36..375941be8 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/BookHistory.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/BookHistory.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. @@ -122,9 +122,6 @@ public class BookHistory { this.pages = pages; } - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/BookReference.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/BookReference.java index 1f0700ed4..0886a62f7 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/BookReference.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/BookReference.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. @@ -124,9 +124,6 @@ public class BookReference { this.pages = pages; } - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/LogEntry.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/LogEntry.java index 81e7c792e..d5737724c 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/LogEntry.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/simpletons/LogEntry.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/AbstractSpringDataEmbeddedCassandraIntegrationTest.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/AbstractSpringDataEmbeddedCassandraIntegrationTest.java index 110e32c0f..dab42e6e9 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/AbstractSpringDataEmbeddedCassandraIntegrationTest.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/AbstractSpringDataEmbeddedCassandraIntegrationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/CassandraVersion.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/CassandraVersion.java index fb6b40dc1..80fcd7fa5 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/CassandraVersion.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/CassandraVersion.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. @@ -15,6 +15,8 @@ */ package org.springframework.data.cassandra.test.integration.support; +import lombok.experimental.UtilityClass; + import org.springframework.data.util.Version; import org.springframework.util.Assert; @@ -22,8 +24,6 @@ import com.datastax.driver.core.ResultSet; import com.datastax.driver.core.Row; import com.datastax.driver.core.Session; -import lombok.experimental.UtilityClass; - /** * Utility to retrieve the Cassandra release version. * diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/IntegrationTestConfig.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/IntegrationTestConfig.java index c8de462e9..ae4b411b4 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/IntegrationTestConfig.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/IntegrationTestConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors + * Copyright 2013-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. @@ -27,7 +27,6 @@ import org.springframework.cassandra.test.integration.support.CassandraConnectio import org.springframework.cassandra.test.integration.support.FastShutdownNettyOptions; import org.springframework.context.annotation.Configuration; import org.springframework.data.cassandra.config.SchemaAction; -import org.springframework.data.cassandra.config.java.AbstractCassandraConfiguration; import org.springframework.data.cassandra.config.java.AbstractReactiveCassandraConfiguration; import com.datastax.driver.core.NettyOptions; diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/SchemaTestUtils.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/SchemaTestUtils.java index 11f901578..52ed03cd4 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/SchemaTestUtils.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/support/SchemaTestUtils.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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/AnotherScannedEntity.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/AnotherScannedEntity.java index d24d2cbbf..5cb8a4117 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/AnotherScannedEntity.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/AnotherScannedEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/AnotherScannedEntityRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/AnotherScannedEntityRepository.java index 3a06d6944..b1900e7fc 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/AnotherScannedEntityRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/AnotherScannedEntityRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/ScannedEntity.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/ScannedEntity.java index 9c49cb35b..c5809705c 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/ScannedEntity.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/ScannedEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/ScannedEntityRepository.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/ScannedEntityRepository.java index af58151ef..78693cf17 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/ScannedEntityRepository.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/ScannedEntityRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/XmlEntityScanningIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/XmlEntityScanningIntegrationTests.java index 72108b09f..4269098d7 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/XmlEntityScanningIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/xmlentityscanning/XmlEntityScanningIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors + * Copyright 2013-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. diff --git a/spring-data-cassandra/src/test/java/reactor/test/TestSubscriber.java b/spring-data-cassandra/src/test/java/reactor/test/TestSubscriber.java index 25ec29451..9f7884492 100644 --- a/spring-data-cassandra/src/test/java/reactor/test/TestSubscriber.java +++ b/spring-data-cassandra/src/test/java/reactor/test/TestSubscriber.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. @@ -16,6 +16,11 @@ package reactor.test; +import reactor.core.Fuseable; +import reactor.core.Receiver; +import reactor.core.Trackable; +import reactor.core.publisher.Operators; + import java.time.Duration; import java.util.ArrayList; import java.util.Arrays; @@ -35,10 +40,6 @@ import java.util.function.Supplier; import org.reactivestreams.Publisher; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; -import reactor.core.Fuseable; -import reactor.core.Receiver; -import reactor.core.Trackable; -import reactor.core.publisher.Operators;