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/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/CqlTemplateUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/core/CqlTemplateUnitTests.java index 250bd455d..d79e67278 100755 --- 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. @@ -97,10 +97,7 @@ public class CqlTemplateUnitTests { verify(mockSession, times(1)).execute(eq("test")); } - /** - * @see DATACASS-304 - */ - @Test + @Test // DATACASS-304 public void doExecuteInSessionCallbackTranslatesToCassandraException() { exception.expect(CassandraReadTimeoutException.class); exception.expectCause(org.hamcrest.Matchers.isA(ReadTimeoutException.class)); @@ -113,10 +110,7 @@ public class CqlTemplateUnitTests { }); } - /** - * @see DATACASS-304 - */ - @Test + @Test // DATACASS-304 public void doExecuteInSessionCallbackTranslatesToCassandraUncategorizedException() { try { @@ -132,10 +126,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-304 - */ - @Test + @Test // DATACASS-304 public void doExecuteInSessionCallbackTranslatesToCassandraUncategorizedDataAccessException() { try { @@ -191,10 +182,7 @@ public class CqlTemplateUnitTests { verifyZeroInteractions(mockResultSet); } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void firstColumnToObjectReturnsColumnValue() { final Row mockRow = mock(Row.class); @@ -226,10 +214,7 @@ public class CqlTemplateUnitTests { verifyZeroInteractions(mockColumnDefinition); } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void firstColumnToObjectReturnsNull() { Row mockRow = mock(Row.class); @@ -248,10 +233,7 @@ public class CqlTemplateUnitTests { verify(mockIterator, never()).next(); } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void processOneIsSuccessful() { ResultSet mockResultSet = mock(ResultSet.class); @@ -270,10 +252,7 @@ public class CqlTemplateUnitTests { verifyZeroInteractions(mockRow); } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void processOneThrowsIncorrectResultSetSizeDataAccessExceptionWhenNoRowsFound() { ResultSet mockResultSet = mock(ResultSet.class); @@ -294,10 +273,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void processOneThrowsIncorrectResultSetSizeDataAccessExceptionWhenTooManyRowsFound() { ResultSet mockResultSet = mock(ResultSet.class); @@ -320,10 +296,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void processOnePassingNullResultSetThrowsIllegalArgumentException() { RowMapper mockRowMapper = mock(RowMapper.class); @@ -336,10 +309,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void processOneWithRequiredTypeIsSuccessful() { ResultSet mockResultSet = mock(ResultSet.class); @@ -365,10 +335,7 @@ public class CqlTemplateUnitTests { verifyZeroInteractions(mockRow); } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void processOneWithRequiredTypeThrowsIncorrectResultSetSizeDataAccessExceptionWhenNoRowsFound() { ResultSet mockResultSet = mock(ResultSet.class); @@ -386,10 +353,7 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void processOneWithRequiredTypeThrowsIncorrectResultSetSizeDataAccessExceptionWhenTooManyRowsFound() { ResultSet mockResultSet = mock(ResultSet.class); @@ -411,20 +375,14 @@ public class CqlTemplateUnitTests { } } - /** - * @see DATACASS-286 - */ - @Test + @Test // DATACASS-286 public void processOneWithRequiredTypePassingNullResultSetThrowsIllegalArgumentException() { exception.expect(IllegalArgumentException.class); template.processOne(null, String.class); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addPreparedStatementOptionsShouldAddDriverQueryOptions() { QueryOptions queryOptions = QueryOptions.builder() // @@ -438,10 +396,7 @@ public class CqlTemplateUnitTests { verify(mockPreparedStatement).setRetryPolicy(FallthroughRetryPolicy.INSTANCE); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addPreparedStatementOptionsShouldAddOurQueryOptions() { QueryOptions queryOptions = QueryOptions.builder().retryPolicy(RetryPolicy.FALLTHROUGH).build(); @@ -454,10 +409,7 @@ public class CqlTemplateUnitTests { verify(mockPreparedStatement).setConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addStatementQueryOptionsShouldAddDriverQueryOptions() { QueryOptions queryOptions = QueryOptions.builder().consistencyLevel(ConsistencyLevel.EACH_QUORUM) // @@ -470,10 +422,7 @@ public class CqlTemplateUnitTests { verify(mockStatement).setRetryPolicy(FallthroughRetryPolicy.INSTANCE); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addStatementQueryOptionsShouldAddOurQueryOptions() { QueryOptions queryOptions = QueryOptions.builder().retryPolicy(RetryPolicy.FALLTHROUGH).build(); @@ -486,10 +435,7 @@ public class CqlTemplateUnitTests { verify(mockStatement).setConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addStatementQueryOptionsShouldNotAddOptions() { QueryOptions queryOptions = QueryOptions.builder().build(); @@ -499,10 +445,7 @@ public class CqlTemplateUnitTests { verifyZeroInteractions(mockStatement); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addStatementQueryOptionsShouldAddGenericQueryOptions() { QueryOptions queryOptions = QueryOptions.builder() // @@ -518,10 +461,7 @@ public class CqlTemplateUnitTests { verify(mockStatement).enableTracing(); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void addInsertWriteOptionsShouldAddDriverQueryOptions() { WriteOptions writeOptions = WriteOptions.builder() // @@ -539,10 +479,7 @@ public class CqlTemplateUnitTests { 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/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/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/CassandraExceptionTranslatorTest.java b/spring-cql/src/test/java/org/springframework/cassandra/support/CassandraExceptionTranslatorTest.java index c2d216b80..6478c1af9 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/support/CassandraExceptionTranslatorTest.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/support/CassandraExceptionTranslatorTest.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/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 67dda41fd..324424284 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 9579b99df..2c5f27734 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 79b57d804..f2a5ab278 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 7c7984950..8627694ed 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/CqlOperationsIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/CqlOperationsIntegrationTests.java index df397f7c8..671a009ee 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/CqlOperationsIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/CqlOperationsIntegrationTests.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. @@ -1074,10 +1074,7 @@ public class CqlOperationsIntegrationTests extends AbstractKeyspaceCreatingInteg cqlTemplate.execute(truncate); } - /** - * @see DATACASS-202 - */ - @Test + @Test // DATACASS-202 public void queryShouldApplyFetchSize() { insertTestObjectArray(); diff --git a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/async/AsynchronousCqlOperationsIntegrationTests.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/async/AsynchronousCqlOperationsIntegrationTests.java index d7f6ca45b..e50a140af 100755 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/async/AsynchronousCqlOperationsIntegrationTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/async/AsynchronousCqlOperationsIntegrationTests.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/async/Book.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/async/Book.java index 36652226a..ce8fa2a16 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/async/Book.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/core/async/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/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-cql/src/test/java/org/springframework/cassandra/test/integration/support/ListListener.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/ListListener.java index 5f79c7917..f1d1a0bbf 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/ListListener.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/ListListener.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/ListOfMapListener.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/ListOfMapListener.java index 41142980f..da4c72b15 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/ListOfMapListener.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/ListOfMapListener.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/MapListener.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/MapListener.java index 5d0cbcfab..3d2e0e4d9 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/MapListener.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/MapListener.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/ObjectListener.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/ObjectListener.java index 64649c6ac..d9c11c081 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/ObjectListener.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/ObjectListener.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/QueryListener.java b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/QueryListener.java index f9749a1a7..1b9980882 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/QueryListener.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/test/integration/support/QueryListener.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/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 904068548..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 () { @@ -131,41 +118,39 @@ public class CassandraSessionFactoryBeanUnitTests { }).when(factoryBean).createTables(anyBoolean(), anyBoolean(), anyBoolean()); factoryBean.setSchemaAction(schemaAction); - assertThat(factoryBean.getSchemaAction()).isEqualTo(schemaAction); factoryBean.performSchemaAction(); - verify(factoryBean, times(1)).createTables(eq(dropTables), eq(dropUnused), eq(ifNotExists)); } - @Test + @Test // DATACASS-219 public void performsSchemaActionCreatesTablesWithDefaults() { performSchemaActionCallsCreateTableWithArgumentsMatchingTheSchemaAction(SchemaAction.CREATE, DEFAULT_DROP_TABLES, DEFAULT_DROP_UNUSED_TABLES, DEFAULT_CREATE_IF_NOT_EXISTS); } - @Test + @Test // DATACASS-219 public void performsSchemaActionCreatesTablesIfNotExists() { performSchemaActionCallsCreateTableWithArgumentsMatchingTheSchemaAction(SchemaAction.CREATE_IF_NOT_EXISTS, DEFAULT_DROP_TABLES, DEFAULT_DROP_UNUSED_TABLES, true); } - @Test + @Test // DATACASS-219 public void performsSchemaActionRecreatesTables() { performSchemaActionCallsCreateTableWithArgumentsMatchingTheSchemaAction(SchemaAction.RECREATE, true, DEFAULT_DROP_UNUSED_TABLES, DEFAULT_CREATE_IF_NOT_EXISTS); } - @Test + @Test // DATACASS-219 public void performsSchemaActionRecreatesAndDropsUnusedTables() { performSchemaActionCallsCreateTableWithArgumentsMatchingTheSchemaAction(SchemaAction.RECREATE_DROP_UNUSED, true, true, DEFAULT_CREATE_IF_NOT_EXISTS); } - @Test + @Test // DATACASS-219 public void performsSchemaActionDoesNotCallCreateTablesWhenSchemaActionIsNone() { - + doAnswer(new Answer() { @Override public Void answer(InvocationOnMock invocationOnMock) throws Throwable { @@ -183,27 +168,27 @@ public class CassandraSessionFactoryBeanUnitTests { verify(factoryBean, never()).createTables(anyBoolean(), anyBoolean(), anyBoolean()); } - @Test + @Test // DATACASS-219 public void setAndGetConverter() { - + assertThat(factoryBean.getConverter()).isNull(); factoryBean.setConverter(mockConverter); assertThat(factoryBean.getConverter()).isEqualTo(mockConverter); verifyZeroInteractions(mockConverter); } - @Test + @Test // DATACASS-219 public void setConverterToNull() { - + exception.expect(IllegalArgumentException.class); exception.expectMessage("CassandraConverter must not be null"); factoryBean.setConverter(null); } - @Test + @Test // DATACASS-219 public void setAndGetSchemaAction() { - + assertThat(factoryBean.getSchemaAction()).isEqualTo(SchemaAction.NONE); factoryBean.setSchemaAction(SchemaAction.CREATE); assertThat(factoryBean.getSchemaAction()).isEqualTo(SchemaAction.CREATE); @@ -211,8 +196,9 @@ public class CassandraSessionFactoryBeanUnitTests { assertThat(factoryBean.getSchemaAction()).isEqualTo(SchemaAction.NONE); } - @Test + @Test // DATACASS-219 public void setSchemaActionToNullThrowsIllegalArgumentException() { + exception.expect(IllegalArgumentException.class); exception.expectMessage("SchemaAction must not be null"); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/config/SchemaActionIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/config/SchemaActionIntegrationTests.java index ae435c64f..39b790fbe 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/config/SchemaActionIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/config/SchemaActionIntegrationTests.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,7 +49,6 @@ import com.datastax.driver.core.TableMetadata; * * @author John Blum * @author Mark Paluch - * @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 b033e3502..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. @@ -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/CassandraBatchTemplateIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraBatchTemplateIntegrationTests.java index 62fe11219..004e42614 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 54c8c6e93..871387348 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 @@ -62,10 +62,7 @@ public class CassandraPersistentEntitySchemaCreatorUnitTests { }); } - /** - * @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/CassandraTemplateUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/CassandraTemplateUnitTests.java index 266de47ce..d13f216c4 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 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. @@ -70,10 +70,7 @@ public class CassandraTemplateUnitTests { return new CassandraConverterRowCallback(converter, type); } - /** - * @see DATACASS-310 - */ - @Test + @Test // DATACASS-310 public void processResultSetHandlesResultSetRows() { ResultSet mockResultSet = mock(ResultSet.class); @@ -101,10 +98,7 @@ public class CassandraTemplateUnitTests { verify(mockCassandraConverter, times(1)).read(eq(Integer.class), eq(mockRowThree)); } - /** - * @see DATACASS-310 - */ - @Test + @Test // DATACASS-310 public void processResultSetHandlesSingleElementResultSet() { Select mockSelect = mock(Select.class); ResultSet mockResultSet = mock(ResultSet.class); @@ -124,10 +118,7 @@ public class CassandraTemplateUnitTests { verify(mockCassandraConverter, times(1)).read(eq(String.class), eq(mockRow)); } - /** - * @see DATACASS-310 - */ - @Test + @Test // DATACASS-310 public void processResultSetHandlesEmptyResultSet() { CassandraConverter mockCassandraConverter = mock(CassandraConverter.class); ResultSet mockResultSet = mock(ResultSet.class); @@ -145,10 +136,7 @@ public class CassandraTemplateUnitTests { verifyZeroInteractions(mockCassandraConverter); } - /** - * @see DATACASS-310 - */ - @Test + @Test // DATACASS-310 public void processResultSetHandlesNullResultSet() { CassandraConverter mockCassandraConverter = mock(CassandraConverter.class); @@ -163,10 +151,7 @@ public class CassandraTemplateUnitTests { verifyZeroInteractions(mockCassandraConverter); } - /** - * @see DATACASS-288 - */ - @Test + @Test // DATACASS-288 public void batchOperationsShouldCallSession() { template.batchOps().insert(new Book()).execute(); 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 706ec31f5..85b6cf17d 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,11 +15,11 @@ */ package org.springframework.data.cassandra.domain; +import lombok.Data; + import org.springframework.data.annotation.Id; 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/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/config/CassandraRepositoryConfigurationExtensionUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/config/CassandraRepositoryConfigurationExtensionUnitTests.java index 796b98a06..a856d0691 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 isStrictMatchIfDomainTypeIsAnnotatedWithDocument() { 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 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 6f98077ed..6f55f0c80 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. 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 db209ae74..0ec37841e 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. @@ -61,10 +61,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); @@ -72,10 +69,7 @@ public class ConvertingParameterAccessorUnitTests { assertThat(accessor.getBindableValue(0)).isNull(); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 @SuppressWarnings({ "rawtypes", "unchecked" }) public void shouldReturnNativeBindableValue() { @@ -91,10 +85,7 @@ public class ConvertingParameterAccessorUnitTests { assertThat(accessor.getBindableValue(0)).isEqualTo((Object) "hello"); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 @SuppressWarnings({ "rawtypes", "unchecked" }) public void shouldReturnConvertedBindableValue() { @@ -107,11 +98,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()); @@ -119,11 +106,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() { @@ -143,10 +126,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() { @@ -156,10 +136,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 9deba0a83..5e313fd52 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. @@ -32,10 +32,7 @@ import org.springframework.data.cassandra.repository.query.StringBasedCassandraQ */ 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'}"; @@ -62,10 +56,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"; @@ -80,10 +71,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"; @@ -95,10 +83,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]}"; @@ -110,10 +95,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}"; @@ -125,10 +107,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/StringBasedCassandraQueryUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/query/StringBasedCassandraQueryUnitTests.java index 7e85e5611..9336a1b7f 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. @@ -107,10 +107,7 @@ public class StringBasedCassandraQueryUnitTests { this.converter.afterPropertiesSet(); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsIndexParameterCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByLastname", String.class); @@ -122,10 +119,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); @@ -137,10 +131,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); @@ -152,10 +143,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); @@ -167,10 +155,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); @@ -182,10 +167,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); @@ -197,10 +179,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); @@ -210,10 +189,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); @@ -223,10 +199,7 @@ public class StringBasedCassandraQueryUnitTests { cassandraQuery.createQuery(accessor); } - /** - * @see DATACASS-117 - */ - @Test + @Test // DATACASS-117 public void bindsIndexParameterInSetCorrectly() { StringBasedCassandraQuery cassandraQuery = getQueryMethod("findByLastNameIn", Collection.class); @@ -238,10 +211,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); @@ -253,10 +223,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); @@ -268,10 +235,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); @@ -283,10 +247,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); @@ -304,10 +265,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); @@ -319,10 +277,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); @@ -339,10 +294,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); @@ -354,10 +306,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()); @@ -377,10 +326,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()); 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 408185079..e394140d0 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 e21e8357a..7fee5c0a0 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/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/core/AsynchronousCassandraTemplateIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/core/AsynchronousCassandraTemplateIntegrationTests.java index 48c682c05..2a91cde1c 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/core/AsynchronousCassandraTemplateIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/core/AsynchronousCassandraTemplateIntegrationTests.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. @@ -19,6 +19,10 @@ import static org.assertj.core.api.Assertions.*; import static org.junit.Assume.*; import static org.springframework.data.cassandra.repository.support.BasicMapId.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + import java.util.Collection; import java.util.UUID; import java.util.concurrent.CancellationException; @@ -43,10 +47,6 @@ import org.springframework.data.cassandra.mapping.Table; import org.springframework.data.cassandra.test.integration.support.SchemaTestUtils; import org.springframework.data.cassandra.test.integration.support.TestListener; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - /** * Integration tests for asynchronous {@link CassandraTemplate} operations. * @@ -201,10 +201,7 @@ public class AsynchronousCassandraTemplateIntegrationTests extends AbstractKeysp fail("should've thrown CancellationException"); } - /** - * @see DATACASS-287 - */ - @Test(timeout = 10000) + @Test(timeout = 10000) // DATACASS-287 public void shouldSelectOneAsynchronously() throws Exception { Person person = Person.random(); @@ -220,10 +217,7 @@ public class AsynchronousCassandraTemplateIntegrationTests extends AbstractKeysp assertThat(objectListener.getResult().id).isEqualTo(person.id); } - /** - * @see DATACASS-287 - */ - @Test(timeout = 10000) + @Test(timeout = 10000) // DATACASS-287 public void shouldSelectOneAsynchronouslyIfObjectIsAbsent() throws Exception { ObjectListener objectListener = ObjectListener.create(); diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/core/CassandraAdminTemplateIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/core/CassandraAdminTemplateIntegrationTests.java index 90b1951a8..2e17ce6f0 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/core/CassandraAdminTemplateIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/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. @@ -58,10 +58,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/test/integration/core/CassandraOperationsIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/core/CassandraOperationsIntegrationTests.java index 4ad83a0da..38e0ae81e 100755 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/core/CassandraOperationsIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/test/integration/core/CassandraOperationsIntegrationTests.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. @@ -627,10 +627,7 @@ public class CassandraOperationsIntegrationTests extends AbstractKeyspaceCreatin assertThat(template.count(Book.class)).isEqualTo(count); } - /** - * @see DATACASS-182 - */ - @Test + @Test // DATACASS-182 public void updateShouldRemoveFields() { Book book = new Book(); @@ -649,10 +646,7 @@ public class CassandraOperationsIntegrationTests extends AbstractKeyspaceCreatin assertThat(loaded.getAuthor()).isEqualTo("author"); } - /** - * @see DATACASS-182 - */ - @Test + @Test // DATACASS-182 public void insertShouldRemoveFields() { Book book = new Book(); @@ -672,10 +666,7 @@ public class CassandraOperationsIntegrationTests extends AbstractKeyspaceCreatin assertThat(loaded.getAuthor()).isEqualTo("author"); } - /** - * @see DATACASS-182 - */ - @Test + @Test // DATACASS-182 public void updateShouldInsertEntity() { Book book = new Book(); @@ -692,10 +683,7 @@ public class CassandraOperationsIntegrationTests extends AbstractKeyspaceCreatin assertThat(loaded.getTitle()).isEqualTo("title"); } - /** - * @see DATACASS-182 - */ - @Test + @Test // DATACASS-182 public void insertAndUpdateToEmptyCollection() { BookReference bookReference = new BookReference(); @@ -715,10 +703,7 @@ public class CassandraOperationsIntegrationTests extends AbstractKeyspaceCreatin assertThat(loaded.getBookmarks()).isNull(); } - /** - * @see DATACASS-182 - */ - @Test + @Test // DATACASS-182 public void stream() throws InterruptedException { while (template.select("SELECT * FROM book", Book.class).size() != 0) { @@ -742,10 +727,7 @@ public class CassandraOperationsIntegrationTests extends AbstractKeyspaceCreatin assertThat(selectedBooks.get(0)).isInstanceOf(Book.class); } - /** - * @see DATACASS-206 - */ - @Test + @Test // DATACASS-206 public void shouldUseSpecifiedColumnNamesForSingleEntityModifyingOperations() { UserToken userToken = new UserToken(); @@ -771,10 +753,7 @@ public class CassandraOperationsIntegrationTests extends AbstractKeyspaceCreatin assertThat(loadAfterDelete).isNull(); } - /** - * @see DATACASS-206 - */ - @Test + @Test // DATACASS-206 public void shouldUseSpecifiedColumnNamesForMultiEntityModifyingOperations() { UserToken userToken = new UserToken(); 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 e89d0803c..cd6a523f3 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. 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 df8c46f3b..3e1ff9b08 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. 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 d834ec472..d920158bc 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 15592ff12..884d173fe 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,10 +150,7 @@ public class CustomConversionTests extends AbstractKeyspaceCreatingIntegrationTe assertThat(row.getSet("people", String.class)).hasSize(1); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldLoadCustomConvertedObject() { cassandraOperations.execute(QueryBuilder.insertInto("employee").value("id", "employee-id").value("person", @@ -180,10 +165,7 @@ public class CustomConversionTests extends AbstractKeyspaceCreatingIntegrationTe assertThat(employee.getPerson().getLastname()).isEqualTo("Simpson"); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void shouldLoadCustomConvertedWithCollectionsObject() { cassandraOperations.execute(QueryBuilder.insertInto("employee").value("id", "employee-id").value("people", @@ -199,10 +181,7 @@ public class CustomConversionTests extends AbstractKeyspaceCreatingIntegrationTe assertThat(apu.getFirstname()).isEqualTo("Apu"); } - /** - * @see DATACASS-296 - */ - @Test + @Test // DATACASS-296 public void dummy() { cassandraOperations.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 e3bce187f..3118c7ea0 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 3e1790197..42b6802d4 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 3012ab5e2..edb4af9d4 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. @@ -64,10 +64,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"); @@ -79,10 +76,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"); @@ -94,10 +88,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"); @@ -109,10 +100,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"); @@ -124,10 +112,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"); @@ -139,10 +124,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"); @@ -154,10 +136,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"); @@ -169,10 +148,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"); @@ -184,10 +160,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"); @@ -199,10 +172,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"); @@ -214,10 +184,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"); @@ -229,10 +196,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"); @@ -244,10 +208,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"); @@ -259,10 +220,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"); @@ -274,10 +232,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"); @@ -289,10 +244,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"); @@ -304,11 +256,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"); @@ -320,10 +268,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"); @@ -335,10 +280,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"); @@ -350,10 +292,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"); @@ -365,10 +304,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"); @@ -383,10 +319,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"); @@ -398,10 +331,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"); @@ -413,10 +343,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"); @@ -428,10 +355,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"); @@ -443,10 +367,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"); @@ -458,10 +379,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"); @@ -473,10 +391,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"); @@ -488,10 +403,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. @@ -508,10 +420,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"); @@ -523,10 +432,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"); @@ -538,10 +444,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"); @@ -553,10 +456,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"); @@ -568,10 +468,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"); @@ -583,10 +480,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"); @@ -598,10 +492,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"); @@ -613,10 +504,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"); @@ -628,10 +516,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"); @@ -643,10 +528,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"); @@ -658,10 +540,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"); @@ -673,10 +552,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"); @@ -688,10 +564,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"); @@ -703,10 +576,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/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 f5a286aec..cc8c8f2bd 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. @@ -19,8 +19,6 @@ import java.time.LocalDate; import java.util.Collection; import java.util.List; -import lombok.Data; -import lombok.Getter; import org.springframework.data.cassandra.repository.CassandraRepository; import org.springframework.data.cassandra.repository.Query; import org.springframework.data.cassandra.test.integration.repository.querymethods.declared.Address; 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 a9816e3d0..589054d85 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. @@ -93,10 +93,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC flynn = personRepository.save(new Person("Flynn (Walter Jr.)", "White")); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldFindByLastname() { List result = personRepository.findByLastname("White"); @@ -104,10 +101,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")); @@ -115,10 +109,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"); @@ -126,10 +117,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"); @@ -137,10 +125,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).isEqualTo(walter); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldFindByMappedUdt() throws InterruptedException { template.execute("CREATE INDEX IF NOT EXISTS person_main_address ON person (mainaddress);"); @@ -153,10 +138,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).isEqualTo(walter); } - /** - * @see DATACASS-172 - */ - @Test + @Test // DATACASS-172 public void shouldFindByMappedUdtStringQuery() throws InterruptedException { template.execute("CREATE INDEX IF NOT EXISTS person_main_address ON person (mainaddress);"); @@ -169,10 +151,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).isEqualTo(walter); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void executesCollectionQueryWithProjection() { Collection collection = personRepository.findPersonProjectedBy(); @@ -180,10 +159,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(collection).hasSize(3).extracting("lastname").contains("White", "White", "White"); } - /** - * @see DATACASS-359 - */ - @Test + @Test // DATACASS-359 public void executesCollectionQueryWithDtoProjection() { Collection collection = personRepository.findPersonDtoBy(); @@ -191,10 +167,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(collection).hasSize(3).extracting("lastname").contains("White", "White", "White"); } - /** - * @see DATACASS-359 - */ - @Test + @Test // DATACASS-359 public void executesCollectionQueryWithDtoDynamicallyProjected() throws Exception { assumeTrue(CassandraVersion.get(template.getSession()).isGreaterThanOrEqualTo(Version.parse("3.4"))); @@ -214,10 +187,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(heisenberg.lastname).isEqualTo("White"); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldFindByNumberOfChildren() throws Exception { template.execute("CREATE INDEX IF NOT EXISTS person_number_of_children ON person (numberofchildren);"); @@ -230,10 +200,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).isEqualTo(walter); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldFindByLocalDate() throws InterruptedException { template.execute("CREATE INDEX IF NOT EXISTS person_created_date ON person (createddate);"); @@ -249,10 +216,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"); @@ -264,10 +228,7 @@ public class QueryDerivationIntegrationTests extends AbstractSpringDataEmbeddedC assertThat(result).hasSize(1); } - /** - * @see DATACASS-7 - */ - @Test + @Test // DATACASS-7 public void shouldUseStartsWithQuery() throws InterruptedException { assumeTrue(CassandraVersion.get(template.getSession()).isGreaterThanOrEqualTo(Version.parse("3.4"))); @@ -284,10 +245,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.get(template.getSession()).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 a89e757ef..96a509fc1 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; @@ -113,8 +112,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); } @@ -165,9 +163,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 993a5f724..b8214837f 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 c633e2bbf..ee12ca3cd 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. 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 536ccb073..3df4e403c 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.