DATACASS-217 - Polish.

Original pull request: #82.
This commit is contained in:
John Blum
2016-08-29 16:08:30 -07:00
parent 23cb654b18
commit f293516ecd

View File

@@ -85,22 +85,6 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
assertThat(bean.getObject().isClosed(), is(true));
}
/**
* @see <a href="https://jira.spring.io/browse/DATACASS-226">DATACASS-226</a>
* @throws Exception
*/
@Test
public void shouldSetCompressionType() throws Exception {
CompressionType compressionType = CompressionType.SNAPPY;
CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean();
bean.setCompressionType(compressionType);
bean.afterPropertiesSet();
assertThat(getConfiguration(bean).getProtocolOptions().getCompression(), is(Compression.SNAPPY));
}
/**
* @see <a href="https://jira.spring.io/browse/DATACASS-217">DATACASS-217</a>
* @throws Exception
@@ -114,7 +98,23 @@ public class CassandraCqlClusterFactoryBeanUnitTests {
bean.setCompressionType(compressionType);
bean.afterPropertiesSet();
assertThat(getConfiguration(bean).getProtocolOptions().getCompression(), is(Compression.LZ4));
assertThat(getProtocolOptions(bean).getCompression(), is(Compression.LZ4));
}
/**
* @see <a href="https://jira.spring.io/browse/DATACASS-226">DATACASS-226</a>
* @throws Exception
*/
@Test
public void shouldSetSnappyCompressionType() throws Exception {
CompressionType compressionType = CompressionType.SNAPPY;
CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean();
bean.setCompressionType(compressionType);
bean.afterPropertiesSet();
assertThat(getProtocolOptions(bean).getCompression(), is(Compression.SNAPPY));
}
/**