Add test case asserting that SBDG's type-safe GemFireProperties class hierarchy does not capture Geode Properties.

Resolves gh-79.
This commit is contained in:
John Blum
2020-04-15 12:35:45 -07:00
parent 9091dc0d78
commit 51e2cf0c3f

View File

@@ -65,6 +65,9 @@ public class GemFirePropertiesFromEnvironmentAutoConfigurationIntegrationTests e
@Autowired
private ClientCache clientCache;
@Autowired
private GemFireProperties gemfireProperties;
@Test
public void gemfirePropertiesArePresent() {
@@ -87,6 +90,16 @@ public class GemFirePropertiesFromEnvironmentAutoConfigurationIntegrationTests e
assertThat(gemfireProperties.getProperty("spring.application.name")).isNull();
}
@Test
public void gemfirePropertiesClassDoesNotCaptureGemFireProperties() {
assertThat(this.gemfireProperties).isNotNull();
assertThat(this.gemfireProperties.getCache().getName()).isNotEqualTo("TestApp");
assertThat(this.gemfireProperties.getCache().getName()).isNotEqualTo("TestName");
assertThat(this.gemfireProperties.getLocator().getHost()).isNotEqualTo("skullbox");
assertThat(this.gemfireProperties.getLocator().getPort()).isNotEqualTo(12345);
}
@SpringBootApplication
@Profile("application-gemfire-properties")
static class GeodeConfiguration { }