DATAGEODE-115 - Add serializable-object-filter and validate-serializable-objects attributes to EnableGemFireProperties.

This commit is contained in:
John Blum
2018-06-08 00:35:18 -07:00
parent 35ba5a178e
commit f08204d89d
3 changed files with 32 additions and 5 deletions

View File

@@ -375,6 +375,25 @@ public class EnableGemFirePropertiesIntegrationTests {
assertThat(gemfireProperties.getProperty("security-shiro-init")).isEqualTo("/path/to/shiro.ini");
}
@Test
public void serializableObjectFilterAndValidateSerializableObjectsGemFirePropertiesConfiguration() {
this.applicationContext =
newApplicationContext(TestSerializableObjectFilterAndValidateSerializableObjectsGemFirePropertiesConfiguration.class);
assertThat(this.applicationContext).isNotNull();
assertThat(this.applicationContext.containsBean("gemfireProperties")).isTrue();
Properties gemfireProperties = this.applicationContext.getBean("gemfireProperties", Properties.class);
assertThat(gemfireProperties).isNotNull();
assertThat(gemfireProperties.containsKey("serializable-object-filter")).isTrue();
assertThat(gemfireProperties.getProperty("serializable-object-filter"))
.isEqualTo("example.app.model.TypeOne,example.app.model.TypeTwo");
assertThat(gemfireProperties.containsKey("validate-serializable-objects")).isTrue();
assertThat(gemfireProperties.getProperty("validate-serializable-objects")).isEqualTo("true");
}
@Test
public void sslGemFirePropertiesConfiguration() {
@@ -516,6 +535,12 @@ public class EnableGemFirePropertiesIntegrationTests {
@EnableSecurity
static class TestSecurityGemFirePropertiesConfiguration { }
@EnableGemFireMockObjects
@PeerCacheApplication
@EnableGemFireProperties(serializableObjectFilter = { "example.app.model.TypeOne", "example.app.model.TypeTwo" },
validateSerializableObjects = true)
static class TestSerializableObjectFilterAndValidateSerializableObjectsGemFirePropertiesConfiguration { }
@EnableGemFireMockObjects
@PeerCacheApplication
@EnableGemFireProperties