Remove punctuation from Exception messages.

Closes #601.
This commit is contained in:
John Blum
2022-06-08 17:29:16 -07:00
parent b58ec1a8fa
commit 9b671bd586
70 changed files with 174 additions and 174 deletions

View File

@@ -259,7 +259,7 @@ public class IndexFactoryBean extends AbstractFactoryBeanSupport<Index> implemen
.filter(existingIndex -> isIgnoreIfExists()) .filter(existingIndex -> isIgnoreIfExists())
.map(existingIndex -> { .map(existingIndex -> {
logWarning("WARNING! You are choosing to ignore this Index [%1$s] and return the existing" logWarning("WARNING; You are choosing to ignore this Index [%1$s] and return the existing"
+ " Index having the same basic definition [%2$s] but with a different name [%3$s];" + " Index having the same basic definition [%2$s] but with a different name [%3$s];"
+ " Make sure no OQL Query Hints refer to this Index by name [%1$s]", + " Make sure no OQL Query Hints refer to this Index by name [%1$s]",
indexName, toBasicIndexDefinition(), existingIndex.getName()); indexName, toBasicIndexDefinition(), existingIndex.getName());
@@ -273,7 +273,7 @@ public class IndexFactoryBean extends AbstractFactoryBeanSupport<Index> implemen
.map(existingIndex -> { .map(existingIndex -> {
// Log an informational warning to caution the user about using the override // Log an informational warning to caution the user about using the override
logWarning("WARNING! You are attempting to 'override' an existing Index [%1$s]" logWarning("WARNING; You are attempting to 'override' an existing Index [%1$s]"
+ " having the same basic definition [%2$s] as the Index that will be created" + " having the same basic definition [%2$s] as the Index that will be created"
+ " by this IndexFactoryBean [%3$s]; 'Override' effectively 'renames' the existing" + " by this IndexFactoryBean [%3$s]; 'Override' effectively 'renames' the existing"
+ " Index [%1$s] by removing it then recreating it under the new name [%3$s] with" + " Index [%1$s] by removing it then recreating it under the new name [%3$s] with"
@@ -370,7 +370,7 @@ public class IndexFactoryBean extends AbstractFactoryBeanSupport<Index> implemen
String existingIndexDefinition = String.format(BASIC_INDEX_DEFINITION, existingIndex.getIndexedExpression(), String existingIndexDefinition = String.format(BASIC_INDEX_DEFINITION, existingIndex.getIndexedExpression(),
existingIndex.getFromClause(), IndexType.valueOf(existingIndex.getType())); existingIndex.getFromClause(), IndexType.valueOf(existingIndex.getType()));
logWarning("WARNING! %1$s existing Index [%2$s] having a definition [%3$s]" logWarning("WARNING; %1$s existing Index [%2$s] having a definition [%3$s]"
+ " that does not match the Index defined [%4$s] by this IndexFactoryBean [%5$s]", + " that does not match the Index defined [%4$s] by this IndexFactoryBean [%5$s]",
action, existingIndex.getName(), existingIndexDefinition, toBasicIndexDefinition(), indexName); action, existingIndex.getName(), existingIndexDefinition, toBasicIndexDefinition(), indexName);
} }

View File

@@ -42,7 +42,7 @@ public enum JndiDataSourceType {
* @param name the GemFire named JNDI DataSource implementation. * @param name the GemFire named JNDI DataSource implementation.
*/ */
JndiDataSourceType(final String name) { JndiDataSourceType(final String name) {
Assert.hasText(name, "The JNDI DataSource Type 'name' must be specified!"); Assert.hasText(name, "The JNDI DataSource Type 'name' must be specified");
this.name = name; this.name = name;
} }

View File

@@ -498,7 +498,7 @@ abstract class ParsingUtils {
? String.format("Attribute [%1$s] of element [%2$s]", attributeName, elementName) ? String.format("Attribute [%1$s] of element [%2$s]", attributeName, elementName)
: String.format("Element [%s]", elementName); : String.format("Element [%s]", elementName);
String message = String.format("%1$s requires VMware Tanzu GemFire version 7 or later. Current version is %2$s.", String message = String.format("%1$s requires VMware Tanzu GemFire version 7 or later; Current version is %2$s",
messagePrefix, GemfireUtils.GEMFIRE_VERSION); messagePrefix, GemfireUtils.GEMFIRE_VERSION);
parserContext.getReaderContext().error(message, null); parserContext.getReaderContext().error(message, null);

View File

@@ -159,7 +159,7 @@ class PartitionedRegionParser extends AbstractPeerRegionParser {
else { else {
String message = String message =
String.format("The Region template [%1$s] must be defined before the Region [%2$s] referring to the template!", String.format("The Region template [%1$s] must be defined before the Region [%2$s] referring to the template",
regionTemplateName, resolveId(element, regionBuilder.getRawBeanDefinition(), parserContext)); regionTemplateName, resolveId(element, regionBuilder.getRawBeanDefinition(), parserContext));
parserContext.getReaderContext().error(message, element); parserContext.getReaderContext().error(message, element);

View File

@@ -62,7 +62,7 @@ public class EvictionAttributesFactoryBean implements FactoryBean<EvictionAttrib
switch (type) { switch (type) {
case HEAP_PERCENTAGE: case HEAP_PERCENTAGE:
if (threshold != null) { if (threshold != null) {
throw new IllegalArgumentException("HEAP_PERCENTAGE (LRU_HEAP algorithm) does not support threshold (a.k.a. maximum)!"); throw new IllegalArgumentException("HEAP_PERCENTAGE (LRU_HEAP algorithm) does not support threshold (a.k.a. maximum)");
} }
return EvictionAttributes.createLRUHeapAttributes(getObjectSizer(), getAction()); return EvictionAttributes.createLRUHeapAttributes(getObjectSizer(), getAction());

View File

@@ -34,7 +34,7 @@ class DefaultFunctionArgumentResolver implements FunctionArgumentResolver {
@Override @Override
public Method getFunctionAnnotatedMethod() { public Method getFunctionAnnotatedMethod() {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override

View File

@@ -67,7 +67,7 @@ class PdxFunctionArgumentResolver extends DefaultFunctionArgumentResolver {
@Override @Override
public Method getFunctionAnnotatedMethod() { public Method getFunctionAnnotatedMethod() {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
boolean isPdxSerializerConfigured() { boolean isPdxSerializerConfigured() {

View File

@@ -83,8 +83,8 @@ class TypeFilterParser {
*/ */
TypeFilterParser(ReaderContext readerContext, ClassLoader classLoader) { TypeFilterParser(ReaderContext readerContext, ClassLoader classLoader) {
Assert.notNull(readerContext, "ReaderContext must not be null!"); Assert.notNull(readerContext, "ReaderContext must not be null");
Assert.notNull(classLoader, "ClassLoader must not be null!"); Assert.notNull(classLoader, "ClassLoader must not be null");
this.readerContext = readerContext; this.readerContext = readerContext;
this.classLoader = classLoader; this.classLoader = classLoader;

View File

@@ -264,7 +264,7 @@ public class ContinuousQueryListenerAdapter implements ContinuousQueryListener {
}, method -> isValidEventHandlerMethodSignature(method, methodName)); }, method -> isValidEventHandlerMethodSignature(method, methodName));
Assert.isTrue(!this.methods.isEmpty(), String.format("Cannot find a suitable method named [%1$s#%2$s];" Assert.isTrue(!this.methods.isEmpty(), String.format("Cannot find a suitable method named [%1$s#%2$s];"
+ " Is the method public and does it have the proper arguments?", + " Is the method public and does it have the proper arguments",
delegateType.getName(), methodName)); delegateType.getName(), methodName));
} }

View File

@@ -196,7 +196,7 @@ class Predicates implements Predicate {
case CONTAINING: case CONTAINING:
return "LIKE"; return "LIKE";
default: default:
throw new IllegalArgumentException(String.format("Unsupported operator %s!", partType)); throw new IllegalArgumentException(String.format("Unsupported operator: %s", partType));
} }
} }
} }

View File

@@ -451,7 +451,7 @@ public class SpringContextBootstrappingInitializer implements ApplicationListene
contextConfigLocationsArray))); contextConfigLocationsArray)));
Assert.state(localApplicationContext.isRunning(), String.format( Assert.state(localApplicationContext.isRunning(), String.format(
"The Spring ApplicationContext (%1$s) failed to be properly initialized with the context config files (%2$s) or base packages (%3$s)!", "The Spring ApplicationContext (%1$s) failed to be properly initialized with the context config files (%2$s) or base packages (%3$s)",
nullSafeGetApplicationContextId(localApplicationContext), Arrays.toString(contextConfigLocationsArray), nullSafeGetApplicationContextId(localApplicationContext), Arrays.toString(contextConfigLocationsArray),
Arrays.toString(basePackagesArray))); Arrays.toString(basePackagesArray)));

View File

@@ -163,8 +163,8 @@ public class GemfireTransactionManager extends AbstractPlatformTransactionManage
} }
catch (Exception cause) { catch (Exception cause) {
throw new CannotCreateTransactionException(String.format("%1$s; %2$s", throw new CannotCreateTransactionException(String.format("%1$s; %2$s",
"An existing, ongoing transaction is already associated with the current thread.", "An existing, ongoing transaction is already associated with the current thread;",
" Are multiple transaction managers present?"), cause); " Are multiple transaction managers present"), cause);
} }
} }
@@ -187,7 +187,7 @@ public class GemfireTransactionManager extends AbstractPlatformTransactionManage
} }
catch (Exception cause) { catch (Exception cause) {
throw new NoTransactionException( throw new NoTransactionException(
"No transaction is associated with the current thread. Are multiple transaction managers present?", "No transaction is associated with the current thread; Are multiple transaction managers present",
cause); cause);
} }
} }
@@ -243,7 +243,7 @@ public class GemfireTransactionManager extends AbstractPlatformTransactionManage
catch (Exception cause) { catch (Exception cause) {
String exceptionMessage = String exceptionMessage =
"No transaction is associated with the current thread. Are multiple transaction managers present?"; "No transaction is associated with the current thread; Are multiple transaction managers present";
throw new NoTransactionException(exceptionMessage, cause); throw new NoTransactionException(exceptionMessage, cause);
} }

View File

@@ -55,14 +55,14 @@ public class AutoRegionLookupWithAutowiringIntegrationTests extends IntegrationT
DataPolicy expectedDataPolicy) { DataPolicy expectedDataPolicy) {
assertThat(region) assertThat(region)
.describedAs(String.format("Region (%1$s) was not properly configured and initialized!", expectedName)) .describedAs(String.format("Region (%1$s) was not properly configured and initialized", expectedName))
.isNotNull(); .isNotNull();
assertThat(region.getName()).isEqualTo(expectedName); assertThat(region.getName()).isEqualTo(expectedName);
assertThat(region.getFullPath()).isEqualTo(expectedFullPath); assertThat(region.getFullPath()).isEqualTo(expectedFullPath);
assertThat(region.getAttributes()) assertThat(region.getAttributes())
.describedAs(String.format("Region (%1$s) must have RegionAttributes defined!", expectedName)) .describedAs(String.format("Region (%1$s) must have RegionAttributes defined", expectedName))
.isNotNull(); .isNotNull();
assertThat(region.getAttributes().getDataPolicy()).isEqualTo(expectedDataPolicy); assertThat(region.getAttributes().getDataPolicy()).isEqualTo(expectedDataPolicy);

View File

@@ -51,7 +51,7 @@ public class AutoRegionLookupWithComponentScanningIntegrationTests extends Integ
public void testAutowiredNativeRegions() { public void testAutowiredNativeRegions() {
assertThat(this.applicationContext.containsBean("autoRegionLookupDao")) assertThat(this.applicationContext.containsBean("autoRegionLookupDao"))
.describedAs("The 'autoRegionLookupDao' Spring bean DAO was not properly configured an initialized!") .describedAs("The 'autoRegionLookupDao' Spring bean DAO was not properly configured an initialized")
.isTrue(); .isTrue();
assertThat(this.applicationContext.getBean("autoRegionLookupDao", AutoRegionLookupDao.class)).isNotNull(); assertThat(this.applicationContext.getBean("autoRegionLookupDao", AutoRegionLookupDao.class)).isNotNull();

View File

@@ -198,7 +198,7 @@ public class CacheClusterConfigurationIntegrationTests extends ForkingClientServ
String expectedRegionFullPath) { String expectedRegionFullPath) {
assertThat(actualRegion) assertThat(actualRegion)
.describedAs("The [%s] was not properly configured and initialized!", expectedRegionName) .describedAs("The [%s] was not properly configured and initialized", expectedRegionName)
.isNotNull(); .isNotNull();
assertThat(actualRegion.getName()).isEqualTo(expectedRegionName); assertThat(actualRegion.getName()).isEqualTo(expectedRegionName);
@@ -272,7 +272,7 @@ public class CacheClusterConfigurationIntegrationTests extends ForkingClientServ
fail("Loading the 'cacheUsingLocalOnlyConfigurationIntegrationTest.xml' Spring ApplicationContext" fail("Loading the 'cacheUsingLocalOnlyConfigurationIntegrationTest.xml' Spring ApplicationContext"
+ " configuration file should have resulted in an Exception due to the Region lookup on" + " configuration file should have resulted in an Exception due to the Region lookup on"
+ " 'ClusterConfigRegion' when GemFire Cluster Configuration is disabled!"); + " 'ClusterConfigRegion' when GemFire Cluster Configuration is disabled");
} }
catch (BeanCreationException expected) { catch (BeanCreationException expected) {

View File

@@ -61,7 +61,7 @@ public class CollocatedRegionsXmlConfigurationIntegrationTests extends Integrati
assertThat(region).isNotNull(); assertThat(region).isNotNull();
assertThat(region.getName()) assertThat(region.getName())
.describedAs("Expected Region with name [%1$s]; but was [%2$s]!", expectedRegionName, region.getName()) .describedAs("Expected Region with name [%1$s]; but was [%2$s]", expectedRegionName, region.getName())
.isEqualTo(expectedRegionName); .isEqualTo(expectedRegionName);
} }

View File

@@ -75,7 +75,7 @@ public class DiskStoreBeanUsingPropertyPlaceholdersIntegrationTests extends Inte
@Test @Test
public void testDiskStoreBeanWithPropertyPlaceholderConfiguration() { public void testDiskStoreBeanWithPropertyPlaceholderConfiguration() {
assertThat(testDataStore).describedAs("The Disk Store was not configured and initialized!").isNotNull(); assertThat(testDataStore).describedAs("The Disk Store was not configured and initialized").isNotNull();
assertThat(testDataStore.getAllowForceCompaction()).isEqualTo(getExpectedValue("allowForceCompaction")); assertThat(testDataStore.getAllowForceCompaction()).isEqualTo(getExpectedValue("allowForceCompaction"));
assertThat(testDataStore.getAutoCompact()).isEqualTo(getExpectedValue("autoCompact")); assertThat(testDataStore.getAutoCompact()).isEqualTo(getExpectedValue("autoCompact"));
assertThat(testDataStore.getCompactionThreshold()).isEqualTo(getExpectedValue("compactionThreshold")); assertThat(testDataStore.getCompactionThreshold()).isEqualTo(getExpectedValue("compactionThreshold"));

View File

@@ -155,10 +155,10 @@ public class GenericRegionFactoryBeanIntegrationTests extends IntegrationTestsSu
protected void assertRegionAttributes(Region<?, ?> region, String expectedRegionName, String expectedRegionPath, protected void assertRegionAttributes(Region<?, ?> region, String expectedRegionName, String expectedRegionPath,
DataPolicy expectedDataPolicy, Scope expectedScope) { DataPolicy expectedDataPolicy, Scope expectedScope) {
assertThat(region).as("The GemFire Cache Region must not be null!").isNotNull(); assertThat(region).as("The GemFire Cache Region must not be null").isNotNull();
assertThat(region.getName()).isEqualTo(expectedRegionName); assertThat(region.getName()).isEqualTo(expectedRegionName);
assertThat(region.getFullPath()).isEqualTo(expectedRegionPath); assertThat(region.getFullPath()).isEqualTo(expectedRegionPath);
assertThat(region.getAttributes()).as("The RegionAttributes must be specified!").isNotNull(); assertThat(region.getAttributes()).as("The RegionAttributes must be specified").isNotNull();
assertThat(region.getAttributes().getDataPolicy()).isEqualTo(expectedDataPolicy); assertThat(region.getAttributes().getDataPolicy()).isEqualTo(expectedDataPolicy);
assertThat(region.getAttributes().getScope()).isEqualTo(expectedScope); assertThat(region.getAttributes().getScope()).isEqualTo(expectedScope);
} }

View File

@@ -758,7 +758,7 @@ public class IndexFactoryBeanUnitTests {
.createKeyIndex(eq(mockQueryService), eq("TestIndex"), eq("id"), eq("/Example")); .createKeyIndex(eq(mockQueryService), eq("TestIndex"), eq("id"), eq("/Example"));
verify(mockLogger, times(1)).warn( verify(mockLogger, times(1)).warn(
eq(String.format("WARNING! You are choosing to ignore this Index [TestIndex] and return the existing Index" eq(String.format("WARNING; You are choosing to ignore this Index [TestIndex] and return the existing Index"
+ " having the same basic definition [%s] but with a different name [MockIndex];" + " having the same basic definition [%s] but with a different name [MockIndex];"
+ " Make sure no OQL Query Hints refer to this Index by name [TestIndex]", + " Make sure no OQL Query Hints refer to this Index by name [TestIndex]",
indexFactoryBean.toBasicIndexDefinition()))); indexFactoryBean.toBasicIndexDefinition())));
@@ -799,7 +799,7 @@ public class IndexFactoryBeanUnitTests {
.createKeyIndex(eq(mockQueryService), eq("TestIndex"), eq("id"), eq("/Example")); .createKeyIndex(eq(mockQueryService), eq("TestIndex"), eq("id"), eq("/Example"));
verify(mockLogger, times(1)).warn( verify(mockLogger, times(1)).warn(
eq(String.format("WARNING! You are attempting to 'override' an existing Index [MockIndex]" eq(String.format("WARNING; You are attempting to 'override' an existing Index [MockIndex]"
+ " having the same basic definition [%s] as the Index that will be created by this" + " having the same basic definition [%s] as the Index that will be created by this"
+ " IndexFactoryBean [TestIndex]; 'Override' effectively 'renames' the existing Index [MockIndex]" + " IndexFactoryBean [TestIndex]; 'Override' effectively 'renames' the existing Index [MockIndex]"
+ " by removing it then recreating it under the new name [TestIndex] with the same definition;" + " by removing it then recreating it under the new name [TestIndex] with the same definition;"
@@ -861,7 +861,7 @@ public class IndexFactoryBeanUnitTests {
.createKeyIndex(eq(mockQueryService), eq("TestIndex"), eq("id"), eq("/Example")); .createKeyIndex(eq(mockQueryService), eq("TestIndex"), eq("id"), eq("/Example"));
verify(mockLogger, times(1)).warn( verify(mockLogger, times(1)).warn(
eq(String.format("WARNING! You are attempting to 'override' an existing Index [MockIndex]" eq(String.format("WARNING; You are attempting to 'override' an existing Index [MockIndex]"
+ " having the same basic definition [%s] as the Index that will be created by this" + " having the same basic definition [%s] as the Index that will be created by this"
+ " IndexFactoryBean [TestIndex]; 'Override' effectively 'renames' the existing Index [MockIndex]" + " IndexFactoryBean [TestIndex]; 'Override' effectively 'renames' the existing Index [MockIndex]"
+ " by removing it then recreating it under the new name [TestIndex] with the same definition;" + " by removing it then recreating it under the new name [TestIndex] with the same definition;"
@@ -1041,7 +1041,7 @@ public class IndexFactoryBeanUnitTests {
eq("/Orders"), eq(null)); eq("/Orders"), eq(null));
verify(mockLogger, times(1)).warn(String.format( verify(mockLogger, times(1)).warn(String.format(
"WARNING! Returning existing Index [TestIndex] having a definition [%1$s] that does not match" "WARNING; Returning existing Index [TestIndex] having a definition [%1$s] that does not match"
+ " the Index defined [%2$s] by this IndexFactoryBean [TestIndex]", + " the Index defined [%2$s] by this IndexFactoryBean [TestIndex]",
existingIndexDefinition, indexFactoryBean.toBasicIndexDefinition())); existingIndexDefinition, indexFactoryBean.toBasicIndexDefinition()));
@@ -1127,7 +1127,7 @@ public class IndexFactoryBeanUnitTests {
eq("TestIndex"), eq("purchaseDate"), eq("/Orders"), eq(null)); eq("TestIndex"), eq("purchaseDate"), eq("/Orders"), eq(null));
verify(mockLogger, times(1)).warn(eq(String.format( verify(mockLogger, times(1)).warn(eq(String.format(
"WARNING! Overriding existing Index [TestIndex] having a definition [%1$s] that does not match" "WARNING; Overriding existing Index [TestIndex] having a definition [%1$s] that does not match"
+ " the Index defined [%2$s] by this IndexFactoryBean [TestIndex]", + " the Index defined [%2$s] by this IndexFactoryBean [TestIndex]",
existingIndexDefinition, indexFactoryBean.toBasicIndexDefinition()))); existingIndexDefinition, indexFactoryBean.toBasicIndexDefinition())));
@@ -1189,7 +1189,7 @@ public class IndexFactoryBeanUnitTests {
.createKeyIndex(eq(mockQueryService), eq("MockIndex"), eq("id"), eq("/Example")); .createKeyIndex(eq(mockQueryService), eq("MockIndex"), eq("id"), eq("/Example"));
verify(mockLogger, times(1)).warn(eq(String.format( verify(mockLogger, times(1)).warn(eq(String.format(
"WARNING! Overriding existing Index [MockIndex] having a definition [%1$s] that does not match" "WARNING; Overriding existing Index [MockIndex] having a definition [%1$s] that does not match"
+ " the Index defined [%2$s] by this IndexFactoryBean [MockIndex]", + " the Index defined [%2$s] by this IndexFactoryBean [MockIndex]",
existingIndexDefinition, indexFactoryBean.toBasicIndexDefinition()))); existingIndexDefinition, indexFactoryBean.toBasicIndexDefinition())));

View File

@@ -82,7 +82,7 @@ public class LookupPartitionRegionMutationIntegrationTests extends IntegrationTe
Collection<String> expectedCacheListenerNames) { Collection<String> expectedCacheListenerNames) {
if (!expectedCacheListenerNames.isEmpty()) { if (!expectedCacheListenerNames.isEmpty()) {
assertNotNull("CacheListeners must not be null!", cacheListeners); assertNotNull("CacheListeners must not be null", cacheListeners);
assertEquals(expectedCacheListenerNames.size(), cacheListeners.length); assertEquals(expectedCacheListenerNames.size(), cacheListeners.length);
assertTrue(toStrings(cacheListeners).containsAll(expectedCacheListenerNames)); assertTrue(toStrings(cacheListeners).containsAll(expectedCacheListenerNames));
} }
@@ -91,7 +91,7 @@ public class LookupPartitionRegionMutationIntegrationTests extends IntegrationTe
private void assertEvictionAttributes(EvictionAttributes evictionAttributes, EvictionAction expectedAction, private void assertEvictionAttributes(EvictionAttributes evictionAttributes, EvictionAction expectedAction,
EvictionAlgorithm expectedAlgorithm, int expectedMaximum) { EvictionAlgorithm expectedAlgorithm, int expectedMaximum) {
assertNotNull("EvictionAttributes must not be null!", evictionAttributes); assertNotNull("EvictionAttributes must not be null", evictionAttributes);
assertEquals(expectedAction, evictionAttributes.getAction()); assertEquals(expectedAction, evictionAttributes.getAction());
assertEquals(expectedAlgorithm, evictionAttributes.getAlgorithm()); assertEquals(expectedAlgorithm, evictionAttributes.getAlgorithm());
assertEquals(expectedMaximum, evictionAttributes.getMaximum()); assertEquals(expectedMaximum, evictionAttributes.getMaximum());
@@ -100,7 +100,7 @@ public class LookupPartitionRegionMutationIntegrationTests extends IntegrationTe
private void assertExpirationAttributes(ExpirationAttributes expirationAttributes, private void assertExpirationAttributes(ExpirationAttributes expirationAttributes,
String description, int expectedTimeout, ExpirationAction expectedAction) { String description, int expectedTimeout, ExpirationAction expectedAction) {
assertNotNull(String.format("ExpirationAttributes for '%1$s' must not be null!", description), assertNotNull(String.format("ExpirationAttributes for '%1$s' must not be null", description),
expirationAttributes); expirationAttributes);
assertEquals(expectedAction, expirationAttributes.getAction()); assertEquals(expectedAction, expirationAttributes.getAction());
assertEquals(expectedTimeout, expirationAttributes.getTimeout()); assertEquals(expectedTimeout, expirationAttributes.getTimeout());
@@ -116,7 +116,7 @@ public class LookupPartitionRegionMutationIntegrationTests extends IntegrationTe
private void assertGemFireComponent(Object gemfireComponent, String expectedName) { private void assertGemFireComponent(Object gemfireComponent, String expectedName) {
assertNotNull("The GemFire component must not be null!", gemfireComponent); assertNotNull("The GemFire component must not be null", gemfireComponent);
assertEquals(expectedName, gemfireComponent.toString()); assertEquals(expectedName, gemfireComponent.toString());
} }
@@ -129,7 +129,7 @@ public class LookupPartitionRegionMutationIntegrationTests extends IntegrationTe
private void assertRegionAttributes(Region<?, ?> region, String expectedName, String expectedFullPath, private void assertRegionAttributes(Region<?, ?> region, String expectedName, String expectedFullPath,
DataPolicy expectedDataPolicy) { DataPolicy expectedDataPolicy) {
assertNotNull(String.format("'%1$s' Region was not properly initialized!", region)); assertNotNull(String.format("'%1$s' Region was not properly initialized", region));
assertEquals(expectedName, region.getName()); assertEquals(expectedName, region.getName());
assertEquals(expectedFullPath, region.getFullPath()); assertEquals(expectedFullPath, region.getFullPath());
assertNotNull(region.getAttributes()); assertNotNull(region.getAttributes());
@@ -205,7 +205,7 @@ public class LookupPartitionRegionMutationIntegrationTests extends IntegrationTe
@Override @Override
public boolean processEvents(List<AsyncEvent> events) { public boolean processEvents(List<AsyncEvent> events) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override
@@ -242,7 +242,7 @@ public class LookupPartitionRegionMutationIntegrationTests extends IntegrationTe
@Override @Override
public V load(LoaderHelper<K, V> helper) throws CacheLoaderException { public V load(LoaderHelper<K, V> helper) throws CacheLoaderException {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override
@@ -276,7 +276,7 @@ public class LookupPartitionRegionMutationIntegrationTests extends IntegrationTe
@Override @Override
public ExpirationAttributes getExpiry(Region.Entry<K, V> entry) { public ExpirationAttributes getExpiry(Region.Entry<K, V> entry) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override

View File

@@ -81,7 +81,7 @@ public class LookupRegionMutationIntegrationTests extends IntegrationTestsSuppor
Collection<String> expectedCacheListenerNames) { Collection<String> expectedCacheListenerNames) {
if (!expectedCacheListenerNames.isEmpty()) { if (!expectedCacheListenerNames.isEmpty()) {
assertThat(cacheListeners).as("CacheListeners must not be null!").isNotNull(); assertThat(cacheListeners).as("CacheListeners must not be null").isNotNull();
assertThat(cacheListeners.length).isEqualTo(expectedCacheListenerNames.size()); assertThat(cacheListeners.length).isEqualTo(expectedCacheListenerNames.size());
assertThat(toStrings(cacheListeners).containsAll(expectedCacheListenerNames)).isTrue(); assertThat(toStrings(cacheListeners).containsAll(expectedCacheListenerNames)).isTrue();
} }
@@ -90,7 +90,7 @@ public class LookupRegionMutationIntegrationTests extends IntegrationTestsSuppor
private void assertEvictionAttributes(EvictionAttributes evictionAttributes, EvictionAction expectedAction, private void assertEvictionAttributes(EvictionAttributes evictionAttributes, EvictionAction expectedAction,
EvictionAlgorithm expectedAlgorithm, int expectedMaximum) { EvictionAlgorithm expectedAlgorithm, int expectedMaximum) {
assertThat(evictionAttributes).as("EvictionAttributes must not be null!").isNotNull(); assertThat(evictionAttributes).as("EvictionAttributes must not be null").isNotNull();
assertThat(evictionAttributes.getAction()).isEqualTo(expectedAction); assertThat(evictionAttributes.getAction()).isEqualTo(expectedAction);
assertThat(evictionAttributes.getAlgorithm()).isEqualTo(expectedAlgorithm); assertThat(evictionAttributes.getAlgorithm()).isEqualTo(expectedAlgorithm);
assertThat(evictionAttributes.getMaximum()).isEqualTo(expectedMaximum); assertThat(evictionAttributes.getMaximum()).isEqualTo(expectedMaximum);
@@ -101,7 +101,7 @@ public class LookupRegionMutationIntegrationTests extends IntegrationTestsSuppor
String description, int expectedTimeout, ExpirationAction expectedAction) { String description, int expectedTimeout, ExpirationAction expectedAction) {
assertThat(expirationAttributes) assertThat(expirationAttributes)
.as(String.format("ExpirationAttributes for '%1$s' must not be null!", description)).isNotNull(); .as(String.format("ExpirationAttributes for '%1$s' must not be null", description)).isNotNull();
assertThat(expirationAttributes.getAction()).isEqualTo(expectedAction); assertThat(expirationAttributes.getAction()).isEqualTo(expectedAction);
assertThat(expirationAttributes.getTimeout()).isEqualTo(expectedTimeout); assertThat(expirationAttributes.getTimeout()).isEqualTo(expectedTimeout);
} }
@@ -116,7 +116,7 @@ public class LookupRegionMutationIntegrationTests extends IntegrationTestsSuppor
private void assertGemFireComponent(Object gemfireComponent, String expectedName) { private void assertGemFireComponent(Object gemfireComponent, String expectedName) {
assertThat(gemfireComponent).as("The GemFire component must not be null!").isNotNull(); assertThat(gemfireComponent).as("The GemFire component must not be null").isNotNull();
assertThat(gemfireComponent.toString()).isEqualTo(expectedName); assertThat(gemfireComponent.toString()).isEqualTo(expectedName);
} }
@@ -129,7 +129,7 @@ public class LookupRegionMutationIntegrationTests extends IntegrationTestsSuppor
private void assertRegionAttributes(Region<?, ?> region, String expectedName, String expectedFullPath, private void assertRegionAttributes(Region<?, ?> region, String expectedName, String expectedFullPath,
DataPolicy expectedDataPolicy) { DataPolicy expectedDataPolicy) {
assertThat(String.format("'%1$s' Region was not properly initialized!", region)).isNotNull(); assertThat(String.format("'%1$s' Region was not properly initialized", region)).isNotNull();
assertThat(region.getName()).isEqualTo(expectedName); assertThat(region.getName()).isEqualTo(expectedName);
assertThat(region.getFullPath()).isEqualTo(expectedFullPath); assertThat(region.getFullPath()).isEqualTo(expectedFullPath);
assertThat(region.getAttributes()).isNotNull(); assertThat(region.getAttributes()).isNotNull();
@@ -208,7 +208,7 @@ public class LookupRegionMutationIntegrationTests extends IntegrationTestsSuppor
@Override @Override
public boolean processEvents(List<AsyncEvent> events) { public boolean processEvents(List<AsyncEvent> events) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override
@@ -245,7 +245,7 @@ public class LookupRegionMutationIntegrationTests extends IntegrationTestsSuppor
@Override @Override
public V load(LoaderHelper<K, V> helper) throws CacheLoaderException { public V load(LoaderHelper<K, V> helper) throws CacheLoaderException {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override
@@ -279,7 +279,7 @@ public class LookupRegionMutationIntegrationTests extends IntegrationTestsSuppor
@Override @Override
public ExpirationAttributes getExpiry(Region.Entry<K, V> entry) { public ExpirationAttributes getExpiry(Region.Entry<K, V> entry) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override

View File

@@ -52,15 +52,15 @@ public class LookupSubRegionIntegrationTests extends IntegrationTestsSupport {
private void assertRegionExists(String expectedRegionName, String expectedRegionPath, Region<?, ?> region) { private void assertRegionExists(String expectedRegionName, String expectedRegionPath, Region<?, ?> region) {
assertThat(region) assertThat(region)
.describedAs("The Region with name (%1$s) at path (%2$s) was null!",expectedRegionName, expectedRegionPath) .describedAs("The Region with name (%1$s) at path (%2$s) was null",expectedRegionName, expectedRegionPath)
.isNotNull(); .isNotNull();
assertThat(region.getName()) assertThat(region.getName())
.describedAs("Expected Region name of %1$s; but was %2$s!", expectedRegionName, region.getName()) .describedAs("Expected Region name of %1$s; but was %2$s", expectedRegionName, region.getName())
.isEqualTo(expectedRegionName); .isEqualTo(expectedRegionName);
assertThat(region.getFullPath()) assertThat(region.getFullPath())
.describedAs("Expected Region path of %1$s; but was %2$s!", expectedRegionPath, region.getFullPath()) .describedAs("Expected Region path of %1$s; but was %2$s", expectedRegionPath, region.getFullPath())
.isEqualTo(expectedRegionPath); .isEqualTo(expectedRegionPath);
} }

View File

@@ -71,11 +71,11 @@ public class PdxDiskStoreIntegrationTests extends IntegrationTestsSupport {
assertThat(region).isNotNull(); assertThat(region).isNotNull();
assertThat(region.getName()) assertThat(region.getName())
.describedAs("Expected Region with name %1$s; but was %2$s!", expectedRegionName, region.getName()) .describedAs("Expected Region with name %1$s; but was %2$s", expectedRegionName, region.getName())
.isEqualTo(expectedRegionName); .isEqualTo(expectedRegionName);
assertThat(region.getFullPath()) assertThat(region.getFullPath())
.describedAs("Expected Region with path %1$s; but was %2$s!", expectedRegionPath, region.getFullPath()) .describedAs("Expected Region with path %1$s; but was %2$s", expectedRegionPath, region.getFullPath())
.isEqualTo(expectedRegionPath); .isEqualTo(expectedRegionPath);
} }
@@ -109,7 +109,7 @@ public class PdxDiskStoreIntegrationTests extends IntegrationTestsSupport {
@Before @Before
public void setup() { public void setup() {
assertThat(pdxDataRegion).as("The PdxData GemFire Region was not created successfully!").isNotNull(); assertThat(pdxDataRegion).as("The PdxData GemFire Region was not created successfully").isNotNull();
if (pdxDataRegion.size() == 0) { if (pdxDataRegion.size() == 0) {
for (int index = 1; index <= NUMBER_OF_REGION_ENTRIES; index++) { for (int index = 1; index <= NUMBER_OF_REGION_ENTRIES; index++) {
@@ -152,7 +152,7 @@ public class PdxDiskStoreIntegrationTests extends IntegrationTestsSupport {
public KeyHolder(T key) { public KeyHolder(T key) {
Assert.notNull(key, "The key cannot be null!"); Assert.notNull(key, "The key cannot be null");
this.key = key; this.key = key;
} }

View File

@@ -845,7 +845,7 @@ public class PeerRegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
factoryBean.setPersistent(true); factoryBean.setPersistent(true);
factoryBean.resolveDataPolicy(mockRegionFactory, true, "PARTITION"); factoryBean.resolveDataPolicy(mockRegionFactory, true, "PARTITION");
fail( fail(
"Setting the 'persistent' attribute to TRUE and 'Data Policy' to PARTITION should have thrown an IllegalArgumentException!"); "Setting the 'persistent' attribute to TRUE and 'Data Policy' to PARTITION should have thrown an IllegalArgumentException");
} }
catch (IllegalArgumentException expected) { catch (IllegalArgumentException expected) {
assertThat(expected.getMessage()).isEqualTo("Data Policy [PARTITION] is not valid when persistent is true"); assertThat(expected.getMessage()).isEqualTo("Data Policy [PARTITION] is not valid when persistent is true");
@@ -1033,7 +1033,7 @@ public class PeerRegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
factoryBean.setPersistent(false); factoryBean.setPersistent(false);
factoryBean.resolveDataPolicy(mockRegionFactory, false, DataPolicy.PERSISTENT_REPLICATE); factoryBean.resolveDataPolicy(mockRegionFactory, false, DataPolicy.PERSISTENT_REPLICATE);
fail( fail(
"Setting the 'persistent' attribute to FALSE and 'Data Policy' to PERSISTENT_REPLICATE should have thrown an IllegalArgumentException!"); "Setting the 'persistent' attribute to FALSE and 'Data Policy' to PERSISTENT_REPLICATE should have thrown an IllegalArgumentException");
} }
catch (IllegalArgumentException expected) { catch (IllegalArgumentException expected) {
assertThat(expected.getMessage()) assertThat(expected.getMessage())
@@ -1057,7 +1057,7 @@ public class PeerRegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
factoryBean.setPersistent(true); factoryBean.setPersistent(true);
factoryBean.resolveDataPolicy(mockRegionFactory, true, "REPLICATE"); factoryBean.resolveDataPolicy(mockRegionFactory, true, "REPLICATE");
fail( fail(
"Setting the 'persistent' attribute to TRUE and 'Data Policy' to REPLICATE should have thrown an IllegalArgumentException!"); "Setting the 'persistent' attribute to TRUE and 'Data Policy' to REPLICATE should have thrown an IllegalArgumentException");
} }
catch (IllegalArgumentException expected) { catch (IllegalArgumentException expected) {
assertThat(expected.getMessage()).isEqualTo("Data Policy [REPLICATE] is not valid when persistent is true"); assertThat(expected.getMessage()).isEqualTo("Data Policy [REPLICATE] is not valid when persistent is true");

View File

@@ -88,7 +88,7 @@ public class RegionDataPolicyShortcutsIntegrationTests extends IntegrationTestsS
public void localRegionWithDataPolicyIsCorrect() { public void localRegionWithDataPolicyIsCorrect() {
assertThat(localWithDataPolicy) assertThat(localWithDataPolicy)
.describedAs("A reference to the 'LocalWithDataPolicy' Region was not property configured!") .describedAs("A reference to the 'LocalWithDataPolicy' Region was not property configured")
.isNotNull(); .isNotNull();
assertThat(localWithDataPolicy.getName()).isEqualTo("LocalWithDataPolicy"); assertThat(localWithDataPolicy.getName()).isEqualTo("LocalWithDataPolicy");
@@ -101,7 +101,7 @@ public class RegionDataPolicyShortcutsIntegrationTests extends IntegrationTestsS
public void localRegionWithShortcutIsCorrect() { public void localRegionWithShortcutIsCorrect() {
assertThat(localWithShortcut) assertThat(localWithShortcut)
.describedAs("A reference to the 'LocalWithShortcut' Region was not property configured!") .describedAs("A reference to the 'LocalWithShortcut' Region was not property configured")
.isNotNull(); .isNotNull();
assertThat(localWithShortcut.getName()).isEqualTo("LocalWithShortcut"); assertThat(localWithShortcut.getName()).isEqualTo("LocalWithShortcut");
@@ -114,7 +114,7 @@ public class RegionDataPolicyShortcutsIntegrationTests extends IntegrationTestsS
public void partitionRegionWithDataPolicyIsCorrect() { public void partitionRegionWithDataPolicyIsCorrect() {
assertThat(partitionWithDataPolicy) assertThat(partitionWithDataPolicy)
.describedAs("A reference to the 'PartitionWithDataPolicy' Region was not property configured!") .describedAs("A reference to the 'PartitionWithDataPolicy' Region was not property configured")
.isNotNull(); .isNotNull();
assertThat(partitionWithDataPolicy.getName()).isEqualTo("PartitionWithDataPolicy"); assertThat(partitionWithDataPolicy.getName()).isEqualTo("PartitionWithDataPolicy");
@@ -127,7 +127,7 @@ public class RegionDataPolicyShortcutsIntegrationTests extends IntegrationTestsS
public void partitionRegionWithShortcutIsCorrect() { public void partitionRegionWithShortcutIsCorrect() {
assertThat(partitionWithShortcut) assertThat(partitionWithShortcut)
.describedAs("A reference to the 'PartitionWithShortcut' Region was not property configured!") .describedAs("A reference to the 'PartitionWithShortcut' Region was not property configured")
.isNotNull(); .isNotNull();
assertThat(partitionWithShortcut.getName()).isEqualTo("PartitionWithShortcut"); assertThat(partitionWithShortcut.getName()).isEqualTo("PartitionWithShortcut");
@@ -140,7 +140,7 @@ public class RegionDataPolicyShortcutsIntegrationTests extends IntegrationTestsS
public void replicateRegionWithDataPolicyIsCorrect() { public void replicateRegionWithDataPolicyIsCorrect() {
assertThat(replicateWithDataPolicy) assertThat(replicateWithDataPolicy)
.describedAs("A reference to the 'ReplicateWithDataPolicy' Region was not property configured!") .describedAs("A reference to the 'ReplicateWithDataPolicy' Region was not property configured")
.isNotNull(); .isNotNull();
assertThat(replicateWithDataPolicy.getName()).isEqualTo("ReplicateWithDataPolicy"); assertThat(replicateWithDataPolicy.getName()).isEqualTo("ReplicateWithDataPolicy");
@@ -153,7 +153,7 @@ public class RegionDataPolicyShortcutsIntegrationTests extends IntegrationTestsS
public void replicateRegionWithShortcutIsCorrect() { public void replicateRegionWithShortcutIsCorrect() {
assertThat(replicateWithShortcut) assertThat(replicateWithShortcut)
.describedAs("A reference to the 'ReplicateWithShortcut' Region was not property configured!") .describedAs("A reference to the 'ReplicateWithShortcut' Region was not property configured")
.isNotNull(); .isNotNull();
assertThat(replicateWithShortcut.getName()).isEqualTo("ReplicateWithShortcut"); assertThat(replicateWithShortcut.getName()).isEqualTo("ReplicateWithShortcut");
@@ -166,7 +166,7 @@ public class RegionDataPolicyShortcutsIntegrationTests extends IntegrationTestsS
public void shortcutDefaultsRegionIsCorrect() { public void shortcutDefaultsRegionIsCorrect() {
assertThat(shortcutDefaults) assertThat(shortcutDefaults)
.describedAs("A reference to the 'ShortcutDefaults' Region was not properly configured!") .describedAs("A reference to the 'ShortcutDefaults' Region was not properly configured")
.isNotNull(); .isNotNull();
assertThat(shortcutDefaults.getName()).isEqualTo("ShortcutDefaults"); assertThat(shortcutDefaults.getName()).isEqualTo("ShortcutDefaults");
@@ -194,7 +194,7 @@ public class RegionDataPolicyShortcutsIntegrationTests extends IntegrationTestsS
public void shortcutOverridesRegionIsCorrect() { public void shortcutOverridesRegionIsCorrect() {
assertThat(shortcutOverrides) assertThat(shortcutOverrides)
.describedAs("A reference to the 'ShortcutOverrides' Region was not properly configured!") .describedAs("A reference to the 'ShortcutOverrides' Region was not properly configured")
.isNotNull(); .isNotNull();
assertThat(shortcutOverrides.getName()).isEqualTo("ShortcutOverrides"); assertThat(shortcutOverrides.getName()).isEqualTo("ShortcutOverrides");

View File

@@ -51,7 +51,7 @@ public class RegionLookupIntegrationTests extends IntegrationTestsSupport {
try { try {
applicationContext = newApplicationContext(configLocation); applicationContext = newApplicationContext(configLocation);
fail("Spring ApplicationContext should have thrown a BeanCreationException caused by a RegionExistsException!"); fail("Spring ApplicationContext should have thrown a BeanCreationException caused by a RegionExistsException");
} }
catch (BeanCreationException expected) { catch (BeanCreationException expected) {

View File

@@ -69,7 +69,7 @@ public class SubRegionIntegrationTests extends IntegrationTestsSupport {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void testGemFireAccountsSubRegionCreation() { public void testGemFireAccountsSubRegionCreation() {
assertThat(cache).as("The GemFire Cache was not properly initialized!").isNotNull(); assertThat(cache).as("The GemFire Cache was not properly initialized").isNotNull();
Region customers = cache.getRegion("Customers"); Region customers = cache.getRegion("Customers");
@@ -92,7 +92,7 @@ public class SubRegionIntegrationTests extends IntegrationTestsSupport {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void testSpringSubRegionConfiguration() { public void testSpringSubRegionConfiguration() {
assertThat(accounts).as("The /Customers/Accounts SubRegion was not properly initialized!").isNotNull(); assertThat(accounts).as("The /Customers/Accounts SubRegion was not properly initialized").isNotNull();
assertThat(accounts.getName()).isEqualTo("Accounts"); assertThat(accounts.getName()).isEqualTo("Accounts");
assertThat(accounts.getFullPath()).isEqualTo("/Customers/Accounts"); assertThat(accounts.getFullPath()).isEqualTo("/Customers/Accounts");

View File

@@ -109,13 +109,13 @@ public class CachingWithGemFireIntegrationTests extends IntegrationTestsSupport
private NamedNumbersInMemoryRepository namedNumbersRepo; private NamedNumbersInMemoryRepository namedNumbersRepo;
public final void setNamedNumbersRepo(final NamedNumbersInMemoryRepository namedNumbersRepo) { public final void setNamedNumbersRepo(final NamedNumbersInMemoryRepository namedNumbersRepo) {
Assert.notNull(namedNumbersRepo, "The 'NamedNumbers' Repository must not be null!"); Assert.notNull(namedNumbersRepo, "The 'NamedNumbers' Repository must not be null");
this.namedNumbersRepo = namedNumbersRepo; this.namedNumbersRepo = namedNumbersRepo;
} }
protected NamedNumbersInMemoryRepository getNamedNumbersRepo() { protected NamedNumbersInMemoryRepository getNamedNumbersRepo() {
Assert.state(namedNumbersRepo != null, Assert.state(namedNumbersRepo != null,
"A reference to the 'NamedNumbers' Repository was not properly configured and initialized!"); "A reference to the 'NamedNumbers' Repository was not properly configured and initialized");
return namedNumbersRepo; return namedNumbersRepo;
} }
@@ -141,12 +141,12 @@ public class CachingWithGemFireIntegrationTests extends IntegrationTestsSupport
} }
public final void setNamedNumbers(final Map<String, Integer> namedNumbers) { public final void setNamedNumbers(final Map<String, Integer> namedNumbers) {
Assert.notNull(namedNumbers, "The reference to the 'NamedNumbers' Map must not be null!"); Assert.notNull(namedNumbers, "The reference to the 'NamedNumbers' Map must not be null");
this.namedNumbers = namedNumbers; this.namedNumbers = namedNumbers;
} }
protected Map<String, Integer> getNamedNumbers() { protected Map<String, Integer> getNamedNumbers() {
Assert.state(namedNumbers != null, "The 'NamedNumbers' Map was not properly configured and initialized!"); Assert.state(namedNumbers != null, "The 'NamedNumbers' Map was not properly configured and initialized");
return namedNumbers; return namedNumbers;
} }

View File

@@ -86,7 +86,7 @@ public class ClientCacheIndexingIntegrationTests extends ForkingClientServerInte
public void testIndexByName() { public void testIndexByName() {
assertThat(clientCache) assertThat(clientCache)
.describedAs("The GemFire ClientCache was not properly configured and initialized!") .describedAs("The GemFire ClientCache was not properly configured and initialized")
.isNotNull(); .isNotNull();
Index actualIndex = getIndex(clientCache, "ExampleIndex"); Index actualIndex = getIndex(clientCache, "ExampleIndex");

View File

@@ -89,7 +89,7 @@ public class ClientSubRegionIntegrationTests extends ForkingClientServerIntegrat
public void gemFireSubRegionCreationConfigurationIsCorrect() { public void gemFireSubRegionCreationConfigurationIsCorrect() {
assertThat(this.clientCache) assertThat(this.clientCache)
.describedAs("The Client Cache was not properly initialized!") .describedAs("The Client Cache was not properly initialized")
.isNotNull(); .isNotNull();
Region<?, ?> parent = this.clientCache.getRegion("Parent"); Region<?, ?> parent = this.clientCache.getRegion("Parent");

View File

@@ -63,7 +63,7 @@ public class LocatorApplicationCannotCoexistWithCacheApplicationIntegrationTests
getBean(GemFireCache.class); getBean(GemFireCache.class);
getBean(Locator.class); getBean(Locator.class);
fail("Caches and Locators cannot coexist!"); fail("Caches and Locators cannot coexist");
} }
catch (BeanDefinitionStoreException expected) { catch (BeanDefinitionStoreException expected) {

View File

@@ -274,7 +274,7 @@ public class CacheNamespaceIntegrationTests extends IntegrationTestsSupport {
@Override @Override
public void onEvent(TimestampedEntryEvent event, GatewayConflictHelper helper) { public void onEvent(TimestampedEntryEvent event, GatewayConflictHelper helper) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
} }
} }

View File

@@ -109,7 +109,7 @@ public class ClientRegionNamespaceIntegrationTests extends IntegrationTestsSuppo
Region<?, ?> simple = requireApplicationContext().getBean("simple", Region.class); Region<?, ?> simple = requireApplicationContext().getBean("simple", Region.class);
assertThat(simple).as("The 'SimpleRegion' Client Region was not properly configured and initialized!") assertThat(simple).as("The 'SimpleRegion' Client Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(simple.getName()).isEqualTo("SimpleRegion"); assertThat(simple.getName()).isEqualTo("SimpleRegion");
assertThat(simple.getFullPath()).isEqualTo(Region.SEPARATOR + "SimpleRegion"); assertThat(simple.getFullPath()).isEqualTo(Region.SEPARATOR + "SimpleRegion");
@@ -171,7 +171,7 @@ public class ClientRegionNamespaceIntegrationTests extends IntegrationTestsSuppo
Region<?, ?> persistent = requireApplicationContext().getBean("persistent", Region.class); Region<?, ?> persistent = requireApplicationContext().getBean("persistent", Region.class);
assertThat(persistent) assertThat(persistent)
.describedAs("The 'PersistentRegion' Region was not properly configured and initialized!") .describedAs("The 'PersistentRegion' Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(persistent.getName()).isEqualTo("PersistentRegion"); assertThat(persistent.getName()).isEqualTo("PersistentRegion");
@@ -234,7 +234,7 @@ public class ClientRegionNamespaceIntegrationTests extends IntegrationTestsSuppo
Region<?, ?> compressed = requireApplicationContext().getBean("Compressed", Region.class); Region<?, ?> compressed = requireApplicationContext().getBean("Compressed", Region.class);
assertThat(compressed).as("The 'Compressed' Client Region was not properly configured and initialized!") assertThat(compressed).as("The 'Compressed' Client Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(compressed.getName()).isEqualTo("Compressed"); assertThat(compressed.getName()).isEqualTo("Compressed");
assertThat(compressed.getFullPath()).isEqualTo(Region.SEPARATOR + "Compressed"); assertThat(compressed.getFullPath()).isEqualTo(Region.SEPARATOR + "Compressed");
@@ -242,7 +242,7 @@ public class ClientRegionNamespaceIntegrationTests extends IntegrationTestsSuppo
assertThat(compressed.getAttributes().getDataPolicy()).isEqualTo(DataPolicy.EMPTY); assertThat(compressed.getAttributes().getDataPolicy()).isEqualTo(DataPolicy.EMPTY);
assertThat(compressed.getAttributes().getPoolName()).isEqualTo("gemfire-pool"); assertThat(compressed.getAttributes().getPoolName()).isEqualTo("gemfire-pool");
assertThat(compressed.getAttributes().getCompressor() instanceof TestCompressor) assertThat(compressed.getAttributes().getCompressor() instanceof TestCompressor)
.describedAs(String.format("Expected 'TestCompressor'; but was '%s'!", .describedAs(String.format("Expected 'TestCompressor'; but was '%s'",
ObjectUtils.nullSafeClassName(compressed.getAttributes().getCompressor()))) ObjectUtils.nullSafeClassName(compressed.getAttributes().getCompressor())))
.isTrue(); .isTrue();
assertThat(compressed.getAttributes().getCompressor().toString()).isEqualTo("STD"); assertThat(compressed.getAttributes().getCompressor().toString()).isEqualTo("STD");
@@ -258,7 +258,7 @@ public class ClientRegionNamespaceIntegrationTests extends IntegrationTestsSuppo
requireApplicationContext().getBean("client-with-attributes", Region.class); requireApplicationContext().getBean("client-with-attributes", Region.class);
assertThat(clientRegion) assertThat(clientRegion)
.describedAs("The 'client-with-attributes' Client Region was not properly configured and initialized!") .describedAs("The 'client-with-attributes' Client Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(clientRegion.getName()).isEqualTo("client-with-attributes"); assertThat(clientRegion.getName()).isEqualTo("client-with-attributes");
@@ -311,7 +311,7 @@ public class ClientRegionNamespaceIntegrationTests extends IntegrationTestsSuppo
@Override @Override
public Object load(final LoaderHelper<Object, Object> helper) throws CacheLoaderException { public Object load(final LoaderHelper<Object, Object> helper) throws CacheLoaderException {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override
@@ -331,12 +331,12 @@ public class ClientRegionNamespaceIntegrationTests extends IntegrationTestsSuppo
@Override @Override
public byte[] compress(final byte[] input) { public byte[] compress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override
public byte[] decompress(final byte[] input) { public byte[] decompress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override

View File

@@ -86,11 +86,11 @@ public class ContinuousQueryListenerContainerNamespaceIntegrationTests
@Test @Test
public void testContainerConfiguration() throws Exception { public void testContainerConfiguration() throws Exception {
assertThat(container).as("The ContinuousQueryListenerContainer was not properly configured!").isNotNull(); assertThat(container).as("The ContinuousQueryListenerContainer was not properly configured").isNotNull();
assertThat(container.isActive()).as("The CQ Listener Container should be active (initialized)!").isTrue(); assertThat(container.isActive()).as("The CQ Listener Container should be active (initialized)").isTrue();
assertThat(container.isAutoStartup()).as("The CQ Listener container should not be configured to auto-start!") assertThat(container.isAutoStartup()).as("The CQ Listener container should not be configured to auto-start")
.isFalse(); .isFalse();
assertThat(container.isRunning()).as("The CQ Listener Container should not be running!").isFalse(); assertThat(container.isRunning()).as("The CQ Listener Container should not be running").isFalse();
assertThat(container.getPhase()).isEqualTo(4); assertThat(container.getPhase()).isEqualTo(4);
assertThat(testErrorHandler).isNotNull(); assertThat(testErrorHandler).isNotNull();
assertThat(TestUtils.<Object>readField("errorHandler", container)).isSameAs(testErrorHandler); assertThat(TestUtils.<Object>readField("errorHandler", container)).isSameAs(testErrorHandler);

View File

@@ -64,7 +64,7 @@ public class GatewayReceiverAutoStartNamespaceIntegrationTests extends Integrati
public void testAuto() throws Exception { public void testAuto() throws Exception {
assertThat(this.autoGatewayReceiverFactory) assertThat(this.autoGatewayReceiverFactory)
.describedAs("The 'Auto' GatewayReceiverFactoryBean was not properly configured and initialized!") .describedAs("The 'Auto' GatewayReceiverFactoryBean was not properly configured and initialized")
.isNotNull(); .isNotNull();
GatewayReceiver autoGatewayReceiver = this.autoGatewayReceiverFactory.getObject(); GatewayReceiver autoGatewayReceiver = this.autoGatewayReceiverFactory.getObject();

View File

@@ -64,7 +64,7 @@ public class GatewayReceiverDefaultStartNamespaceIntegrationTests extends Integr
public void testDefault() throws Exception { public void testDefault() throws Exception {
assertThat(this.defaultGatewayReceiverFactory) assertThat(this.defaultGatewayReceiverFactory)
.describedAs("The 'Default' GatewayReceiverFactoryBean was not properly configured and initialized!") .describedAs("The 'Default' GatewayReceiverFactoryBean was not properly configured and initialized")
.isNotNull(); .isNotNull();
GatewayReceiver defaultGatewayReceiver = this.defaultGatewayReceiverFactory.getObject(); GatewayReceiver defaultGatewayReceiver = this.defaultGatewayReceiverFactory.getObject();

View File

@@ -63,7 +63,7 @@ public class GatewayReceiverManualStartNamespaceIntegrationTests extends Integra
public void testManual() throws Exception { public void testManual() throws Exception {
assertThat(this.manualGatewayReceiverFactory) assertThat(this.manualGatewayReceiverFactory)
.describedAs("The 'Manual' GatewayReceiverFactoryBean was not properly configured and initialized!") .describedAs("The 'Manual' GatewayReceiverFactoryBean was not properly configured and initialized")
.isNotNull(); .isNotNull();
GatewayReceiver manualGatewayReceiver = this.manualGatewayReceiverFactory.getObject(); GatewayReceiver manualGatewayReceiver = this.manualGatewayReceiverFactory.getObject();

View File

@@ -64,7 +64,7 @@ public class GemfireV8GatewayNamespaceIntegrationTests extends IntegrationTestsS
public void testGatewaySenderEventSubstitutionFilter() { public void testGatewaySenderEventSubstitutionFilter() {
assertThat(gatewaySenderWithEventSubstitutionFilter) assertThat(gatewaySenderWithEventSubstitutionFilter)
.describedAs("The 'gatewaySenderEventSubtitutionFilter' bean was not properly configured and initialized!") .describedAs("The 'gatewaySenderEventSubtitutionFilter' bean was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(gatewaySenderWithEventSubstitutionFilter.getId()).isEqualTo("gateway-sender-with-event-substitution-filter"); assertThat(gatewaySenderWithEventSubstitutionFilter.getId()).isEqualTo("gateway-sender-with-event-substitution-filter");
@@ -81,7 +81,7 @@ public class GemfireV8GatewayNamespaceIntegrationTests extends IntegrationTestsS
public void testGatewaySenderEventSubstitutionFilterRef() { public void testGatewaySenderEventSubstitutionFilterRef() {
assertThat(gatewaySenderWithEventSubstitutionFilterRef) assertThat(gatewaySenderWithEventSubstitutionFilterRef)
.describedAs("The 'gatewaySenderEventSubtitutionFilter' bean was not properly configured and initialized!") .describedAs("The 'gatewaySenderEventSubtitutionFilter' bean was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(gatewaySenderWithEventSubstitutionFilterRef.getId()).isEqualTo("gateway-sender-with-event-substitution-filter-ref"); assertThat(gatewaySenderWithEventSubstitutionFilterRef.getId()).isEqualTo("gateway-sender-with-event-substitution-filter-ref");
@@ -108,7 +108,7 @@ public class GemfireV8GatewayNamespaceIntegrationTests extends IntegrationTestsS
@Override @Override
public Object getSubstituteValue(EntryEvent<Object, Object> objectObjectEntryEvent) { public Object getSubstituteValue(EntryEvent<Object, Object> objectObjectEntryEvent) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override

View File

@@ -58,7 +58,7 @@ public class JndiBindingsWithPropertyPlaceholdersNamespaceIntegrationTests exten
} }
} }
fail("ConfigProperty with name [%1$s] was not found!", expectedPropertyName); fail("ConfigProperty with name [%1$s] was not found", expectedPropertyName);
} }
@Test @Test

View File

@@ -72,7 +72,7 @@ public class LocalRegionNamespaceIntegrationTests extends IntegrationTestsSuppor
Region<?, ?> simple = applicationContext.getBean("simple", Region.class); Region<?, ?> simple = applicationContext.getBean("simple", Region.class);
assertThat(simple) assertThat(simple)
.describedAs("The 'simple' Region was not properly configured or initialized!") .describedAs("The 'simple' Region was not properly configured or initialized")
.isNotNull(); .isNotNull();
assertThat(simple.getName()).isEqualTo("simple"); assertThat(simple.getName()).isEqualTo("simple");
@@ -132,7 +132,7 @@ public class LocalRegionNamespaceIntegrationTests extends IntegrationTestsSuppor
Region region = applicationContext.getBean("local-with-attributes", Region.class); Region region = applicationContext.getBean("local-with-attributes", Region.class);
assertThat(region) assertThat(region)
.describedAs("The 'local-with-attributes' Region was not properly configured and initialized!") .describedAs("The 'local-with-attributes' Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(region.getName()).isEqualTo("local-with-attributes"); assertThat(region.getName()).isEqualTo("local-with-attributes");
@@ -174,7 +174,7 @@ public class LocalRegionNamespaceIntegrationTests extends IntegrationTestsSuppor
Region persistentLocalRegion = applicationContext.getBean("persistent", Region.class); Region persistentLocalRegion = applicationContext.getBean("persistent", Region.class);
assertThat(persistentLocalRegion) assertThat(persistentLocalRegion)
.describedAs("The 'persistent' Local Region was not properly configured and initialized!") .describedAs("The 'persistent' Local Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(persistentLocalRegion.getName()).isEqualTo("persistent"); assertThat(persistentLocalRegion.getName()).isEqualTo("persistent");
@@ -193,7 +193,7 @@ public class LocalRegionNamespaceIntegrationTests extends IntegrationTestsSuppor
Region<?, ?> compressed = applicationContext.getBean("Compressed", Region.class); Region<?, ?> compressed = applicationContext.getBean("Compressed", Region.class);
assertThat(compressed).as("The 'Compressed' Local Region was not properly configured and initialized!") assertThat(compressed).as("The 'Compressed' Local Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(compressed.getName()).isEqualTo("Compressed"); assertThat(compressed.getName()).isEqualTo("Compressed");
assertThat(compressed.getFullPath()).isEqualTo(Region.SEPARATOR + "Compressed"); assertThat(compressed.getFullPath()).isEqualTo(Region.SEPARATOR + "Compressed");
@@ -214,12 +214,12 @@ public class LocalRegionNamespaceIntegrationTests extends IntegrationTestsSuppor
@Override @Override
public byte[] compress(byte[] input) { public byte[] compress(byte[] input) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override
public byte[] decompress(byte[] input) { public byte[] decompress(byte[] input) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override

View File

@@ -65,7 +65,7 @@ public class LocalRegionWithEvictionPolicyActionNamespaceIntegrationTests extend
@Test @Test
public void testLocalRegionConfigurationWithEvictionPolicyActionSetToLocalDestroy() { public void testLocalRegionConfigurationWithEvictionPolicyActionSetToLocalDestroy() {
assertThat(localDestroyRegion).as("The 'LocalDestroy' Region was not properly configured and initialized!") assertThat(localDestroyRegion).as("The 'LocalDestroy' Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(localDestroyRegion.getName()).isEqualTo("LocalDestroy"); assertThat(localDestroyRegion.getName()).isEqualTo("LocalDestroy");
assertThat(localDestroyRegion.getFullPath()).isEqualTo("/LocalDestroy"); assertThat(localDestroyRegion.getFullPath()).isEqualTo("/LocalDestroy");
@@ -80,7 +80,7 @@ public class LocalRegionWithEvictionPolicyActionNamespaceIntegrationTests extend
@Test @Test
public void testLocalRegionConfigurationWithEvictionPolicyActionSetToNone() { public void testLocalRegionConfigurationWithEvictionPolicyActionSetToNone() {
assertThat(noneRegion).as("The 'None' Region was not properly configured and initialized!").isNotNull(); assertThat(noneRegion).as("The 'None' Region was not properly configured and initialized").isNotNull();
assertThat(noneRegion.getName()).isEqualTo("None"); assertThat(noneRegion.getName()).isEqualTo("None");
assertThat(noneRegion.getFullPath()).isEqualTo("/None"); assertThat(noneRegion.getFullPath()).isEqualTo("/None");
assertThat(noneRegion.getAttributes()).isNotNull(); assertThat(noneRegion.getAttributes()).isNotNull();
@@ -93,7 +93,7 @@ public class LocalRegionWithEvictionPolicyActionNamespaceIntegrationTests extend
@Test @Test
public void testLocalRegionConfigurationWithEvictionPolicyActionSetToOverflowToDisk() { public void testLocalRegionConfigurationWithEvictionPolicyActionSetToOverflowToDisk() {
assertThat(overflowRegion).as("The 'Overflow' Region was not properly configured and initialized!").isNotNull(); assertThat(overflowRegion).as("The 'Overflow' Region was not properly configured and initialized").isNotNull();
assertThat(overflowRegion.getName()).isEqualTo("Overflow"); assertThat(overflowRegion.getName()).isEqualTo("Overflow");
assertThat(overflowRegion.getFullPath()).isEqualTo("/Overflow"); assertThat(overflowRegion.getFullPath()).isEqualTo("/Overflow");
assertThat(overflowRegion.getAttributes()).isNotNull(); assertThat(overflowRegion.getAttributes()).isNotNull();

View File

@@ -157,7 +157,7 @@ public class PartitionedRegionNamespaceIntegrationTests extends IntegrationTests
Region<?, ?> compressed = requireApplicationContext().getBean("compressed", Region.class); Region<?, ?> compressed = requireApplicationContext().getBean("compressed", Region.class);
assertThat(compressed) assertThat(compressed)
.describedAs("The 'compressed' PARTITION Region was not properly configured and initialized!") .describedAs("The 'compressed' PARTITION Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(compressed.getName()).isEqualTo("compressed"); assertThat(compressed.getName()).isEqualTo("compressed");
@@ -203,7 +203,7 @@ public class PartitionedRegionNamespaceIntegrationTests extends IntegrationTests
Region<?, ?> listeners = requireApplicationContext().getBean("listeners", Region.class); Region<?, ?> listeners = requireApplicationContext().getBean("listeners", Region.class);
assertThat(listeners) assertThat(listeners)
.describedAs("The 'listeners' PARTITION Region was not properly configured and initialized!") .describedAs("The 'listeners' PARTITION Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(listeners.getName()).isEqualTo("listeners"); assertThat(listeners.getName()).isEqualTo("listeners");
@@ -233,7 +233,7 @@ public class PartitionedRegionNamespaceIntegrationTests extends IntegrationTests
Region<?, ?> listeners = requireApplicationContext().getBean("listenerRef", Region.class); Region<?, ?> listeners = requireApplicationContext().getBean("listenerRef", Region.class);
assertThat(listeners) assertThat(listeners)
.describedAs("The 'listenerRef' PARTITION Region was not properly configured and initialized!") .describedAs("The 'listenerRef' PARTITION Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(listeners.getName()).isEqualTo("listenerRef"); assertThat(listeners.getName()).isEqualTo("listenerRef");
@@ -260,12 +260,12 @@ public class PartitionedRegionNamespaceIntegrationTests extends IntegrationTests
@Override @Override
public byte[] compress(final byte[] input) { public byte[] compress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override
public byte[] decompress(final byte[] input) { public byte[] decompress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override

View File

@@ -71,7 +71,7 @@ public class RegionDefinitionUsingBeansNamespaceIntegrationTests extends Integra
@Test @Test
public void testExampleRegionBeanDefinitionConfiguration() { public void testExampleRegionBeanDefinitionConfiguration() {
assertThat(example).as("The '/Example' Region was not properly configured and initialized!").isNotNull(); assertThat(example).as("The '/Example' Region was not properly configured and initialized").isNotNull();
assertThat(example.getName()).isEqualTo("Example"); assertThat(example.getName()).isEqualTo("Example");
assertThat(example.getFullPath()).isEqualTo("/Example"); assertThat(example.getFullPath()).isEqualTo("/Example");
assertThat(example.getAttributes()).isNotNull(); assertThat(example.getAttributes()).isNotNull();
@@ -107,7 +107,7 @@ public class RegionDefinitionUsingBeansNamespaceIntegrationTests extends Integra
@Test @Test
public void testAnotherExampleRegionDefinitionConfiguration() { public void testAnotherExampleRegionDefinitionConfiguration() {
assertThat(anotherExample).as("The '/AnotherExample' Region was not properly configured and initialized!") assertThat(anotherExample).as("The '/AnotherExample' Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(anotherExample.getName()).isEqualTo("AnotherExample"); assertThat(anotherExample.getName()).isEqualTo("AnotherExample");
assertThat(anotherExample.getFullPath()).isEqualTo("/AnotherExample"); assertThat(anotherExample.getFullPath()).isEqualTo("/AnotherExample");

View File

@@ -77,7 +77,7 @@ public class RegionExpirationAttributesNamespaceIntegrationTests extends Integra
DataPolicy dataPolicy) { DataPolicy dataPolicy) {
assertThat(region) assertThat(region)
.as(String.format("The '%1$s' Region was not properly configured and initialized!", regionName)) .as(String.format("The '%1$s' Region was not properly configured and initialized", regionName))
.isNotNull(); .isNotNull();
assertThat(region.getName()).isEqualTo(regionName); assertThat(region.getName()).isEqualTo(regionName);
assertThat(region.getFullPath()).isEqualTo(regionFullPath); assertThat(region.getFullPath()).isEqualTo(regionFullPath);
@@ -167,8 +167,8 @@ public class RegionExpirationAttributesNamespaceIntegrationTests extends Integra
@Override @Override
public ExpirationAttributes getExpiry(final Region.Entry<K, V> kvEntry) { public ExpirationAttributes getExpiry(final Region.Entry<K, V> kvEntry) {
Assert.state(timeout != null, "The expiration 'timeout' must be specified!"); Assert.state(timeout != null, "The expiration 'timeout' must be specified");
Assert.state(action != null, "The expiration 'action' must be specified!"); Assert.state(action != null, "The expiration 'action' must be specified");
return new ExpirationAttributes(timeout, action); return new ExpirationAttributes(timeout, action);
} }

View File

@@ -71,7 +71,7 @@ public class RegionSubscriptionAttributesNamespaceIntegrationTests extends Integ
private void assertSubscription(Region<?, ?> region, String expectedRegionName, private void assertSubscription(Region<?, ?> region, String expectedRegionName,
DataPolicy expectedDataPolicy, InterestPolicy expectedInterestedPolicy) { DataPolicy expectedDataPolicy, InterestPolicy expectedInterestedPolicy) {
assertThat(region).describedAs(String.format("The '%1$s' Region was not properly configured an initialized!", expectedRegionName)).isNotNull(); assertThat(region).describedAs(String.format("The '%1$s' Region was not properly configured an initialized", expectedRegionName)).isNotNull();
assertThat(region.getName()).isEqualTo(expectedRegionName); assertThat(region.getName()).isEqualTo(expectedRegionName);
assertThat(region.getAttributes()).isNotNull(); assertThat(region.getAttributes()).isNotNull();
assertThat(region.getAttributes().getDataPolicy()).isEqualTo(expectedDataPolicy); assertThat(region.getAttributes().getDataPolicy()).isEqualTo(expectedDataPolicy);

View File

@@ -69,7 +69,7 @@ public class RegionsWithDiskStoreAndPersistenceEvictionSettingsIntegrationTests
public void testNotPersistentNoOverflowRegion() { public void testNotPersistentNoOverflowRegion() {
assertThat(notPersistentNoOverflowRegion) assertThat(notPersistentNoOverflowRegion)
.describedAs("The Not Persistent, No Overflow Region was not properly configured and initialized!") .describedAs("The Not Persistent, No Overflow Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(notPersistentNoOverflowRegion.getAttributes()).isNotNull(); assertThat(notPersistentNoOverflowRegion.getAttributes()).isNotNull();
@@ -83,7 +83,7 @@ public class RegionsWithDiskStoreAndPersistenceEvictionSettingsIntegrationTests
public void testNotPersistentOverflowRegion() { public void testNotPersistentOverflowRegion() {
assertThat(notPersistentOverflowRegion) assertThat(notPersistentOverflowRegion)
.describedAs("The Not Persistent, Overflow Region was not properly configured and initialized!") .describedAs("The Not Persistent, Overflow Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(notPersistentOverflowRegion.getAttributes()).isNotNull(); assertThat(notPersistentOverflowRegion.getAttributes()).isNotNull();
@@ -97,7 +97,7 @@ public class RegionsWithDiskStoreAndPersistenceEvictionSettingsIntegrationTests
public void testPersistentNoOverflowRegion() { public void testPersistentNoOverflowRegion() {
assertThat(persistentNoOverflowRegion) assertThat(persistentNoOverflowRegion)
.describedAs("The Persistent, No Overflow Region was not properly configured and initialized!") .describedAs("The Persistent, No Overflow Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(persistentNoOverflowRegion.getAttributes()).isNotNull(); assertThat(persistentNoOverflowRegion.getAttributes()).isNotNull();
@@ -111,7 +111,7 @@ public class RegionsWithDiskStoreAndPersistenceEvictionSettingsIntegrationTests
public void testPersistentOverflowRegion() { public void testPersistentOverflowRegion() {
assertThat(persistentOverflowRegion) assertThat(persistentOverflowRegion)
.describedAs("The Persistent, Overflow Region was not properly configured and initialized!") .describedAs("The Persistent, Overflow Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(persistentOverflowRegion.getAttributes()).isNotNull(); assertThat(persistentOverflowRegion.getAttributes()).isNotNull();

View File

@@ -137,7 +137,7 @@ public class ReplicatedRegionNamespaceIntegrationTests extends IntegrationTestsS
Region<?, ?> region = applicationContext.getBean("replicated-with-attributes", Region.class); Region<?, ?> region = applicationContext.getBean("replicated-with-attributes", Region.class);
assertThat(region) assertThat(region)
.describedAs("The 'replicated-with-attributes' Region was not properly configured and initialized!") .describedAs("The 'replicated-with-attributes' Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
RegionAttributes regionAttributes = region.getAttributes(); RegionAttributes regionAttributes = region.getAttributes();
@@ -167,7 +167,7 @@ public class ReplicatedRegionNamespaceIntegrationTests extends IntegrationTestsS
Region<?, ?> region = applicationContext.getBean("replicated-with-synchronous-index-updates", Region.class); Region<?, ?> region = applicationContext.getBean("replicated-with-synchronous-index-updates", Region.class);
assertThat(region).as(String.format("The '%1$s' Region was not properly configured and initialized!", assertThat(region).as(String.format("The '%1$s' Region was not properly configured and initialized",
"replicated-with-synchronous-index-updates")).isNotNull(); "replicated-with-synchronous-index-updates")).isNotNull();
RegionAttributes<?, ?> regionAttributes = region.getAttributes(); RegionAttributes<?, ?> regionAttributes = region.getAttributes();
@@ -200,7 +200,7 @@ public class ReplicatedRegionNamespaceIntegrationTests extends IntegrationTestsS
Region<?, ?> compressed = applicationContext.getBean("Compressed", Region.class); Region<?, ?> compressed = applicationContext.getBean("Compressed", Region.class);
assertThat(compressed).as("The 'Compressed' REPLICATE Region was not properly configured and initialized!") assertThat(compressed).as("The 'Compressed' REPLICATE Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(compressed.getName()).isEqualTo("Compressed"); assertThat(compressed.getName()).isEqualTo("Compressed");
assertThat(compressed.getFullPath()).isEqualTo(Region.SEPARATOR + "Compressed"); assertThat(compressed.getFullPath()).isEqualTo(Region.SEPARATOR + "Compressed");
@@ -221,12 +221,12 @@ public class ReplicatedRegionNamespaceIntegrationTests extends IntegrationTestsS
@Override @Override
public byte[] compress(final byte[] input) { public byte[] compress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override
public byte[] decompress(final byte[] input) { public byte[] decompress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override

View File

@@ -76,7 +76,7 @@ public class SubRegionSubElementNamespaceIntegrationTests extends IntegrationTes
} }
assertThat(found) assertThat(found)
.as(String.format("Expected a GemFire CacheListener of type (%1$s) to be registered on Region (%2$s)!", .describedAs(String.format("Expected a GemFire CacheListener of type (%1$s) to be registered on Region (%2$s)",
TestNoOpCacheListener.class.getName(), customersAccountsRegion.getName())).isTrue(); TestNoOpCacheListener.class.getName(), customersAccountsRegion.getName())).isTrue();
} }
@@ -106,7 +106,7 @@ public class SubRegionSubElementNamespaceIntegrationTests extends IntegrationTes
@Override @Override
public boolean processEvents(final List<AsyncEvent> events) { public boolean processEvents(final List<AsyncEvent> events) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override

View File

@@ -105,7 +105,7 @@ public class TemplateClientRegionNamespaceIntegrationTests extends IntegrationTe
private void assertEvictionAttributes(EvictionAttributes evictionAttributes, EvictionAction expectedAction, private void assertEvictionAttributes(EvictionAttributes evictionAttributes, EvictionAction expectedAction,
EvictionAlgorithm expectedAlgorithm, int expectedMaximum, ObjectSizer expectedObjectSizer) { EvictionAlgorithm expectedAlgorithm, int expectedMaximum, ObjectSizer expectedObjectSizer) {
assertThat(evictionAttributes).describedAs("The 'EvictionAttributes' must not be null!").isNotNull(); assertThat(evictionAttributes).describedAs("The 'EvictionAttributes' must not be null").isNotNull();
assertThat(evictionAttributes.getAction()).isEqualTo(expectedAction); assertThat(evictionAttributes.getAction()).isEqualTo(expectedAction);
assertThat(evictionAttributes.getAlgorithm()).isEqualTo(expectedAlgorithm); assertThat(evictionAttributes.getAlgorithm()).isEqualTo(expectedAlgorithm);
assertThat(evictionAttributes.getMaximum()).isEqualTo(expectedMaximum); assertThat(evictionAttributes.getMaximum()).isEqualTo(expectedMaximum);
@@ -122,16 +122,16 @@ public class TemplateClientRegionNamespaceIntegrationTests extends IntegrationTe
private void assertExpirationAttributes(ExpirationAttributes expirationAttributes, ExpirationAction expectedAction, private void assertExpirationAttributes(ExpirationAttributes expirationAttributes, ExpirationAction expectedAction,
int expectedTimeout) { int expectedTimeout) {
assertThat(expirationAttributes).as("The 'ExpirationAttributes' must not be null!").isNotNull(); assertThat(expirationAttributes).as("The 'ExpirationAttributes' must not be null").isNotNull();
assertThat(expirationAttributes.getAction()).isEqualTo(expectedAction); assertThat(expirationAttributes.getAction()).isEqualTo(expectedAction);
assertThat(expirationAttributes.getTimeout()).isEqualTo(expectedTimeout); assertThat(expirationAttributes.getTimeout()).isEqualTo(expectedTimeout);
} }
private void assertDefaultRegionAttributes(Region<?, ?> region) { private void assertDefaultRegionAttributes(Region<?, ?> region) {
assertThat(region).describedAs("The Region must not be null!").isNotNull(); assertThat(region).describedAs("The Region must not be null").isNotNull();
assertThat(region.getAttributes()) assertThat(region.getAttributes())
.describedAs("The Region (%1$s) must have 'RegionAttributes' defined!", region.getFullPath()) .describedAs("The Region (%1$s) must have 'RegionAttributes' defined", region.getFullPath())
.isNotNull(); .isNotNull();
assertThat(region.getAttributes().getCompressor()).isNull(); assertThat(region.getAttributes().getCompressor()).isNull();
assertThat(region.getAttributes().getCustomEntryIdleTimeout()).isNull(); assertThat(region.getAttributes().getCustomEntryIdleTimeout()).isNull();
@@ -160,11 +160,11 @@ public class TemplateClientRegionNamespaceIntegrationTests extends IntegrationTe
private static void assertRegionMetaData(Region<?, ?> region, String expectedRegionName, String expectedRegionPath) { private static void assertRegionMetaData(Region<?, ?> region, String expectedRegionName, String expectedRegionPath) {
assertThat(region).as(String.format("The '%1$s' Region was not properly configured and initialized!", assertThat(region).as(String.format("The '%1$s' Region was not properly configured and initialized",
expectedRegionName)).isNotNull(); expectedRegionName)).isNotNull();
assertThat(region.getName()).isEqualTo(expectedRegionName); assertThat(region.getName()).isEqualTo(expectedRegionName);
assertThat(region.getFullPath()).isEqualTo(expectedRegionPath); assertThat(region.getFullPath()).isEqualTo(expectedRegionPath);
assertThat(region.getAttributes()).as(String.format("The '%1$s' Region must have RegionAttributes defined!", assertThat(region.getAttributes()).as(String.format("The '%1$s' Region must have RegionAttributes defined",
expectedRegionName)).isNotNull(); expectedRegionName)).isNotNull();
} }

View File

@@ -77,7 +77,7 @@ public class TemplatePersistentPartitionRegionNamespaceIntegrationTests extends
@Test @Test
public void testExampleTemplatedPersistentPartitionRegion() { public void testExampleTemplatedPersistentPartitionRegion() {
assertThat(example).describedAs("The '/Example' PARTITION Region was not properly configured and initialized!").isNotNull(); assertThat(example).describedAs("The '/Example' PARTITION Region was not properly configured and initialized").isNotNull();
assertThat(example.getName()).isEqualTo("Example"); assertThat(example.getName()).isEqualTo("Example");
assertThat(example.getFullPath()).isEqualTo("/Example"); assertThat(example.getFullPath()).isEqualTo("/Example");
assertThat(example.getAttributes()).isNotNull(); assertThat(example.getAttributes()).isNotNull();
@@ -99,7 +99,7 @@ public class TemplatePersistentPartitionRegionNamespaceIntegrationTests extends
@Override @Override
public Object getRoutingObject(final EntryOperation<K, V> kvEntryOperation) { public Object getRoutingObject(final EntryOperation<K, V> kvEntryOperation) {
throw new UnsupportedOperationException("Not Implemented!"); throw new UnsupportedOperationException("Not Implemented");
} }
@Override @Override

View File

@@ -155,7 +155,7 @@ public class TemplateRegionsNamespaceIntegrationTests extends IntegrationTestsSu
private void assertEvictionAttributes(EvictionAttributes evictionAttributes, EvictionAction expectedAction, private void assertEvictionAttributes(EvictionAttributes evictionAttributes, EvictionAction expectedAction,
EvictionAlgorithm expectedAlgorithm, int expectedMaximum, ObjectSizer expectedObjectSizer) { EvictionAlgorithm expectedAlgorithm, int expectedMaximum, ObjectSizer expectedObjectSizer) {
assertThat(evictionAttributes).as("The 'EvictionAttributes' must not be null!").isNotNull(); assertThat(evictionAttributes).as("The 'EvictionAttributes' must not be null").isNotNull();
assertThat(evictionAttributes.getAction()).isEqualTo(expectedAction); assertThat(evictionAttributes.getAction()).isEqualTo(expectedAction);
assertThat(evictionAttributes.getAlgorithm()).isEqualTo(expectedAlgorithm); assertThat(evictionAttributes.getAlgorithm()).isEqualTo(expectedAlgorithm);
assertThat(evictionAttributes.getMaximum()).isEqualTo(expectedMaximum); assertThat(evictionAttributes.getMaximum()).isEqualTo(expectedMaximum);
@@ -172,7 +172,7 @@ public class TemplateRegionsNamespaceIntegrationTests extends IntegrationTestsSu
private void assertExpirationAttributes(ExpirationAttributes expirationAttributes, ExpirationAction expectedAction, private void assertExpirationAttributes(ExpirationAttributes expirationAttributes, ExpirationAction expectedAction,
int expectedTimeout) { int expectedTimeout) {
assertThat(expirationAttributes).as("The 'ExpirationAttributes' must not be null!").isNotNull(); assertThat(expirationAttributes).as("The 'ExpirationAttributes' must not be null").isNotNull();
assertThat(expirationAttributes.getAction()).isEqualTo(expectedAction); assertThat(expirationAttributes.getAction()).isEqualTo(expectedAction);
assertThat(expirationAttributes.getTimeout()).isEqualTo(expectedTimeout); assertThat(expirationAttributes.getTimeout()).isEqualTo(expectedTimeout);
} }
@@ -216,10 +216,10 @@ public class TemplateRegionsNamespaceIntegrationTests extends IntegrationTestsSu
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private void assertDefaultRegionAttributes(Region region) { private void assertDefaultRegionAttributes(Region region) {
assertThat(region).describedAs("The Region must not be null!").isNotNull(); assertThat(region).describedAs("The Region must not be null").isNotNull();
assertThat(region.getAttributes()) assertThat(region.getAttributes())
.describedAs(String.format("Region (%1$s) must have 'RegionAttributes' defined!",region.getFullPath())) .describedAs(String.format("Region (%1$s) must have 'RegionAttributes' defined",region.getFullPath()))
.isNotNull(); .isNotNull();
assertThat(region.getAttributes().getCompressor()).isNull(); assertThat(region.getAttributes().getCompressor()).isNull();
@@ -241,7 +241,7 @@ public class TemplateRegionsNamespaceIntegrationTests extends IntegrationTestsSu
private void assertSubscriptionAttributes(SubscriptionAttributes subscriptionAttributes, private void assertSubscriptionAttributes(SubscriptionAttributes subscriptionAttributes,
InterestPolicy expectedInterestPolicy) { InterestPolicy expectedInterestPolicy) {
assertThat(subscriptionAttributes).as("The 'SubscriptionAttributes' must not be null!").isNotNull(); assertThat(subscriptionAttributes).as("The 'SubscriptionAttributes' must not be null").isNotNull();
assertThat(subscriptionAttributes.getInterestPolicy()).isEqualTo(expectedInterestPolicy); assertThat(subscriptionAttributes.getInterestPolicy()).isEqualTo(expectedInterestPolicy);
} }
@@ -263,11 +263,11 @@ public class TemplateRegionsNamespaceIntegrationTests extends IntegrationTestsSu
private static void assertRegionMetaData(Region<?, ?> region, String expectedRegionName, String expectedRegionPath) { private static void assertRegionMetaData(Region<?, ?> region, String expectedRegionName, String expectedRegionPath) {
assertThat(region).as(String.format("The '%1$s' Region was not properly configured and initialized!", assertThat(region).as(String.format("The '%1$s' Region was not properly configured and initialized",
expectedRegionName)).isNotNull(); expectedRegionName)).isNotNull();
assertThat(region.getName()).isEqualTo(expectedRegionName); assertThat(region.getName()).isEqualTo(expectedRegionName);
assertThat(region.getFullPath()).isEqualTo(expectedRegionPath); assertThat(region.getFullPath()).isEqualTo(expectedRegionPath);
assertThat(region.getAttributes()).as(String.format("The '%1$s' Region must have RegionAttributes defined!", assertThat(region.getAttributes()).as(String.format("The '%1$s' Region must have RegionAttributes defined",
expectedRegionName)).isNotNull(); expectedRegionName)).isNotNull();
} }
@@ -289,7 +289,7 @@ public class TemplateRegionsNamespaceIntegrationTests extends IntegrationTestsSu
try { try {
applicationContext.getBean(beanName); applicationContext.getBean(beanName);
fail(String fail(String
.format("The abstract bean definition '%1$s' should not exist as a bean in the Spring context!", .format("The abstract bean definition '%1$s' should not exist as a bean in the Spring context",
beanName)); beanName));
} }
catch (BeansException expected) { catch (BeansException expected) {

View File

@@ -213,7 +213,7 @@ public class EvictionAttributesFactoryBeanTest {
} }
catch (IllegalArgumentException expected) { catch (IllegalArgumentException expected) {
assertThat(expected.getMessage()) assertThat(expected.getMessage())
.isEqualTo("HEAP_PERCENTAGE (LRU_HEAP algorithm) does not support threshold (a.k.a. maximum)!"); .isEqualTo("HEAP_PERCENTAGE (LRU_HEAP algorithm) does not support threshold (a.k.a. maximum)");
assertThat(factoryBean.getThreshold().intValue()).isEqualTo(85); assertThat(factoryBean.getThreshold().intValue()).isEqualTo(85);
assertThat(factoryBean.getType()).isEqualTo(EvictionPolicyType.HEAP_PERCENTAGE); assertThat(factoryBean.getType()).isEqualTo(EvictionPolicyType.HEAP_PERCENTAGE);
throw expected; throw expected;

View File

@@ -90,7 +90,7 @@ public class PdxFunctionArgumentResolverIntegrationTests extends IntegrationTest
return type.getDeclaredMethod(methodName, parameterTypes); return type.getDeclaredMethod(methodName, parameterTypes);
} }
catch (NoSuchMethodException cause) { catch (NoSuchMethodException cause) {
throw newRuntimeException("Failed to get method [%1$s] with signature [%2$s] on Class type [%3$s]!", throw newRuntimeException("Failed to get method [%1$s] with signature [%2$s] on Class type [%3$s]",
methodName, getMethodSignature(methodName, parameterTypes), type.getName()); methodName, getMethodSignature(methodName, parameterTypes), type.getName());
} }
} }

View File

@@ -293,7 +293,7 @@ public class MappingPdxSerializerUnitTests {
} }
catch (IllegalArgumentException expected) { catch (IllegalArgumentException expected) {
assertThat(expected).hasMessage("CustomInstantiators must not be null!"); assertThat(expected).hasMessage("CustomInstantiators must not be null");
assertThat(expected).hasNoCause(); assertThat(expected).hasNoCause();
throw expected; throw expected;

View File

@@ -40,7 +40,7 @@ public class Account {
private String number; private String number;
public Account(final Long customerId) { public Account(final Long customerId) {
Assert.notNull(customerId, "The Customer ID to which this Account is associated cannot be null!"); Assert.notNull(customerId, "The Customer ID to which this Account is associated cannot be null");
this.customerId = customerId; this.customerId = customerId;
} }

View File

@@ -58,11 +58,11 @@ public class AlgorithmRepositoryIntegrationTests extends IntegrationTestsSupport
public void algorithmsRepositoryFunctionsCorrectly() { public void algorithmsRepositoryFunctionsCorrectly() {
assertThat(algorithmRepo) assertThat(algorithmRepo)
.describedAs("A reference to the AlgorithmRepository was not properly configured!") .describedAs("A reference to the AlgorithmRepository was not properly configured")
.isNotNull(); .isNotNull();
assertThat(algorithmsRegion) assertThat(algorithmsRegion)
.describedAs("A reference to the 'Algorithms' GemFire Cache Region was not properly configured!") .describedAs("A reference to the 'Algorithms' GemFire Cache Region was not properly configured")
.isNotNull(); .isNotNull();
assertThat(algorithmsRegion.getName()).isEqualTo("Algorithms"); assertThat(algorithmsRegion.getName()).isEqualTo("Algorithms");

View File

@@ -185,21 +185,21 @@ public class SubRegionRepositoryIntegrationTests extends IntegrationTestsSupport
@Before @Before
public void setup() { public void setup() {
assertThat(programmers).as("The /Users/Programmers Subregion was null!").isNotNull(); assertThat(programmers).as("The /Users/Programmers Subregion was null").isNotNull();
if (programmers.isEmpty()) { if (programmers.isEmpty()) {
programmers.putAll(PROGRAMMER_USER_DATA); programmers.putAll(PROGRAMMER_USER_DATA);
} }
assertThat(programmers.size()).isEqualTo(PROGRAMMER_USER_DATA.size()); assertThat(programmers.size()).isEqualTo(PROGRAMMER_USER_DATA.size());
assertThat(adminUsers).as("The /Local/Admins/Users Subregion was null!").isNotNull(); assertThat(adminUsers).as("The /Local/Admins/Users Subregion was null").isNotNull();
if (adminUsers.isEmpty()) { if (adminUsers.isEmpty()) {
adminUsers.putAll(ADMIN_USER_DATA); adminUsers.putAll(ADMIN_USER_DATA);
} }
assertThat(adminUsers.size()).isEqualTo(ADMIN_USER_DATA.size()); assertThat(adminUsers.size()).isEqualTo(ADMIN_USER_DATA.size());
assertThat(guestUsers).as("The /Local/Guest/Users Subregion was null!").isNotNull(); assertThat(guestUsers).as("The /Local/Guest/Users Subregion was null").isNotNull();
if (guestUsers.isEmpty()) { if (guestUsers.isEmpty()) {
guestUsers.putAll(GUEST_USER_DATA); guestUsers.putAll(GUEST_USER_DATA);

View File

@@ -60,7 +60,7 @@ public class UserRepositoryQueriesIntegrationTests extends IntegrationTestsSuppo
private static void assertQueryResults(Iterable<User> actualUsers, String... expectedUsernames) { private static void assertQueryResults(Iterable<User> actualUsers, String... expectedUsernames) {
assertThat(actualUsers).as("The query did not return any results!").isNotNull(); assertThat(actualUsers).as("The query did not return any results").isNotNull();
List<String> actualUsernames = new ArrayList<>(expectedUsernames.length); List<String> actualUsernames = new ArrayList<>(expectedUsernames.length);
@@ -99,7 +99,7 @@ public class UserRepositoryQueriesIntegrationTests extends IntegrationTestsSuppo
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void setup() { public void setup() {
assertThat(users).describedAs("The 'Users' GemFire Cache Region cannot be null!").isNotNull(); assertThat(users).describedAs("The 'Users' GemFire Cache Region cannot be null").isNotNull();
if (users.isEmpty()) { if (users.isEmpty()) {
userRepository.save(createUser("blumj", true)); userRepository.save(createUser("blumj", true));

View File

@@ -144,7 +144,7 @@ public abstract class AbstractGemfireRepositoryFactoryIntegrationTests extends I
try { try {
repository.findByLastname("Matthews"); repository.findByLastname("Matthews");
fail("Exception expected!"); fail("Exception expected");
} catch (IncorrectResultSizeDataAccessException e) { } catch (IncorrectResultSizeDataAccessException e) {
assertThat(e.getExpectedSize()).isEqualTo(1); assertThat(e.getExpectedSize()).isEqualTo(1);
assertThat(e.getActualSize()).isEqualTo(2); assertThat(e.getActualSize()).isEqualTo(2);

View File

@@ -88,7 +88,7 @@ public class SimpleGemfireRepositoryTransactionalIntegrationTests extends Integr
public void setup() { public void setup() {
assertThat(this.customers) assertThat(this.customers)
.describedAs("The 'Customers' Cache Region was not properly configured and initialized!") .describedAs("The 'Customers' Cache Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(this.customers.getName()).isEqualTo("Customers"); assertThat(this.customers.getName()).isEqualTo("Customers");

View File

@@ -192,7 +192,7 @@ public class LuceneOperationsIntegrationTests extends IntegrationTestsSupport {
} }
}); });
assertThat(flushed).describedAs("LuceneIndex not flushed!").isTrue(); assertThat(flushed).describedAs("LuceneIndex not flushed").isTrue();
} }
} }

View File

@@ -83,7 +83,7 @@ public class LazyWiringDeclarableSupportFunctionBasedIntegrationTests extends In
@Test @Test
public void helloGreeting() { public void helloGreeting() {
assertThat(helloFunctionExecution.hello(null)).isEqualTo("Hello Everyone!"); assertThat(helloFunctionExecution.hello(null)).isEqualTo("Hello Everyone");
} }
protected static abstract class FunctionAdaptor<T> extends LazyWiringDeclarableSupport implements Function<T> { protected static abstract class FunctionAdaptor<T> extends LazyWiringDeclarableSupport implements Function<T> {
@@ -121,7 +121,7 @@ public class LazyWiringDeclarableSupportFunctionBasedIntegrationTests extends In
protected static final String ADDRESS_TO_PARAMETER = "hello.address.to"; protected static final String ADDRESS_TO_PARAMETER = "hello.address.to";
protected static final String DEFAULT_ADDRESS_TO = "World"; protected static final String DEFAULT_ADDRESS_TO = "World";
protected static final String HELLO_GREETING = "Hello %1$s!"; protected static final String HELLO_GREETING = "Hello %1$s";
protected static final String ID = "hello"; protected static final String ID = "hello";
@Value("${hello.default.address.to}") @Value("${hello.default.address.to}")

View File

@@ -246,7 +246,7 @@ public class SpringContextBootstrappingInitializerIntegrationTests extends Integ
public UserDataStoreCacheLoader() { public UserDataStoreCacheLoader() {
Assert.state(INSTANCE.compareAndSet(null, this), Assert.state(INSTANCE.compareAndSet(null, this),
String.format("An instance of %1$s was already created!", getClass().getName())); String.format("An instance of %1$s was already created", getClass().getName()));
} }
@Override @Override

View File

@@ -698,7 +698,7 @@ public class SpringContextBootstrappingInitializerUnitTests {
assertThat(expected.getMessage().contains("Failed to bootstrap the Spring ApplicationContext")).isTrue(); assertThat(expected.getMessage().contains("Failed to bootstrap the Spring ApplicationContext")).isTrue();
assertThat(expected.getCause() instanceof IllegalStateException).isTrue(); assertThat(expected.getCause() instanceof IllegalStateException).isTrue();
assertThat(expected.getCause().getMessage()).isEqualTo( assertThat(expected.getCause().getMessage()).isEqualTo(
"The Spring ApplicationContext (testInitWhenApplicationContextIsNotRunning) failed to be properly initialized with the context config files ([]) or base packages ([org.example.app, org.example.plugins])!"); "The Spring ApplicationContext (testInitWhenApplicationContextIsNotRunning) failed to be properly initialized with the context config files ([]) or base packages ([org.example.app, org.example.plugins])");
throw (IllegalStateException) expected.getCause(); throw (IllegalStateException) expected.getCause();
} }

View File

@@ -40,7 +40,7 @@ public class TestUserDao implements UserDao {
private DataSource userDataSource; private DataSource userDataSource;
public DataSource getDataSource() { public DataSource getDataSource() {
Assert.state(userDataSource != null, "A reference to the Users DataSource was not properly configured!"); Assert.state(userDataSource != null, "A reference to the Users DataSource was not properly configured");
return userDataSource; return userDataSource;
} }
} }

View File

@@ -38,7 +38,7 @@ public class TestUserService implements UserService {
private UserDao userDao; private UserDao userDao;
public UserDao getUserDao() { public UserDao getUserDao() {
Assert.state(userDao != null, "A reference to the UserDao was not properly configured!"); Assert.state(userDao != null, "A reference to the UserDao was not properly configured");
return userDao; return userDao;
} }
} }

View File

@@ -181,7 +181,7 @@ public class CommitConflictExceptionTransactionalIntegrationTests extends Integr
}, Function.identity()); }, Function.identity());
fail("Expected CommitConflictException!"); fail("Expected CommitConflictException");
} }
catch (RuntimeException expected) { catch (RuntimeException expected) {

View File

@@ -77,7 +77,7 @@ public class GemfireTransactionManagerIntegrationTests extends IntegrationTestsS
} }
catch (IllegalArgumentException expected) { catch (IllegalArgumentException expected) {
assertThat(expected).hasMessage("BOOM!"); assertThat(expected).hasMessage("BOOM");
assertThat(expected).hasNoCause(); assertThat(expected).hasNoCause();
throw expected; throw expected;
@@ -161,7 +161,7 @@ public class GemfireTransactionManagerIntegrationTests extends IntegrationTestsS
@Transactional(propagation = Propagation.REQUIRED) @Transactional(propagation = Propagation.REQUIRED)
public void doOperationTwoInTransactionOne() { public void doOperationTwoInTransactionOne() {
throw new IllegalArgumentException("BOOM!"); throw new IllegalArgumentException("BOOM");
} }
} }
} }

View File

@@ -71,7 +71,7 @@ public class CachePartitionRegionWithConcurrentParallelAsyncEventQueueAndGateway
public void testPartitionRegionWithConcurrentParallelAsyncEventQueueAndGatewaySenderConfiguration() { public void testPartitionRegionWithConcurrentParallelAsyncEventQueueAndGatewaySenderConfiguration() {
assertThat(exampleRegion) assertThat(exampleRegion)
.describedAs("The 'ExampleRegion' PARTITION Region was not properly configured and initialized!") .describedAs("The 'ExampleRegion' PARTITION Region was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(exampleRegion.getName()).isEqualTo("ExampleRegion"); assertThat(exampleRegion.getName()).isEqualTo("ExampleRegion");
@@ -86,7 +86,7 @@ public class CachePartitionRegionWithConcurrentParallelAsyncEventQueueAndGateway
public void testConcurrentParallelAsyncEventQueue() { public void testConcurrentParallelAsyncEventQueue() {
assertThat(exampleQueue) assertThat(exampleQueue)
.describedAs("The 'ExampleQueue' AsyncEventQueue was not properly configured and initialized!") .describedAs("The 'ExampleQueue' AsyncEventQueue was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(exampleQueue.getId()).isEqualTo("ExampleQueue"); assertThat(exampleQueue.getId()).isEqualTo("ExampleQueue");
@@ -99,7 +99,7 @@ public class CachePartitionRegionWithConcurrentParallelAsyncEventQueueAndGateway
public void testConcurrentParallelGatewaySender() { public void testConcurrentParallelGatewaySender() {
assertThat(exampleGateway) assertThat(exampleGateway)
.describedAs("The 'ExampleGateway' was not properly configured and initialized!") .describedAs("The 'ExampleGateway' was not properly configured and initialized")
.isNotNull(); .isNotNull();
assertThat(exampleGateway.getId()).isEqualTo("ExampleGateway"); assertThat(exampleGateway.getId()).isEqualTo("ExampleGateway");

View File

@@ -67,7 +67,7 @@ public class GatewayReceiverManualStartIntegrationTests extends IntegrationTests
public void autoGatewayReceiverConfigurationIsCorrect() { public void autoGatewayReceiverConfigurationIsCorrect() {
assertThat(autoGatewayReceiver) assertThat(autoGatewayReceiver)
.describedAs("The 'Auto' GatewayReceiver was not properly configured or initialized!") .describedAs("The 'Auto' GatewayReceiver was not properly configured or initialized")
.isNotNull(); .isNotNull();
assertThat(autoGatewayReceiver.isRunning()).isTrue(); assertThat(autoGatewayReceiver.isRunning()).isTrue();
@@ -77,7 +77,7 @@ public class GatewayReceiverManualStartIntegrationTests extends IntegrationTests
int gatewayReceiverPort = autoGatewayReceiver.getPort(); int gatewayReceiverPort = autoGatewayReceiver.getPort();
assertGreaterThanEqualToLessThanEqualTo(String.format( assertGreaterThanEqualToLessThanEqualTo(String.format(
"GatewayReceiver 'port' [%1$d] was not greater than equal to [%2$d] and less than equal to [%3$d]!", "GatewayReceiver 'port' [%1$d] was not greater than equal to [%2$d] and less than equal to [%3$d]",
gatewayReceiverPort, autoGatewayReceiver.getStartPort(), autoGatewayReceiver.getEndPort()), gatewayReceiverPort, autoGatewayReceiver.getStartPort(), autoGatewayReceiver.getEndPort()),
gatewayReceiverPort, autoGatewayReceiver.getStartPort(), autoGatewayReceiver.getEndPort()); gatewayReceiverPort, autoGatewayReceiver.getStartPort(), autoGatewayReceiver.getEndPort());
@@ -90,7 +90,7 @@ public class GatewayReceiverManualStartIntegrationTests extends IntegrationTests
public void manualGatewayReceiverConfigurationIsCorrect() throws IOException { public void manualGatewayReceiverConfigurationIsCorrect() throws IOException {
assertThat(manualGatewayReceiver) assertThat(manualGatewayReceiver)
.describedAs("The 'Manual' GatewayReceiver was not properly configured or initialized!") .describedAs("The 'Manual' GatewayReceiver was not properly configured or initialized")
.isNotNull(); .isNotNull();
assertThat(manualGatewayReceiver.isRunning()).isFalse(); assertThat(manualGatewayReceiver.isRunning()).isFalse();
@@ -104,7 +104,7 @@ public class GatewayReceiverManualStartIntegrationTests extends IntegrationTests
int gatewayReceiverPort = manualGatewayReceiver.getPort(); int gatewayReceiverPort = manualGatewayReceiver.getPort();
assertGreaterThanEqualToLessThanEqualTo(String.format( assertGreaterThanEqualToLessThanEqualTo(String.format(
"GatewayReceiver 'port' [%1$d] was not greater than equal to [%2$d] and less than equal to [%3$d]!", "GatewayReceiver 'port' [%1$d] was not greater than equal to [%2$d] and less than equal to [%3$d]",
gatewayReceiverPort, manualGatewayReceiver.getStartPort(), manualGatewayReceiver.getEndPort()), gatewayReceiverPort, manualGatewayReceiver.getStartPort(), manualGatewayReceiver.getEndPort()),
gatewayReceiverPort, manualGatewayReceiver.getStartPort(), manualGatewayReceiver.getEndPort()); gatewayReceiverPort, manualGatewayReceiver.getStartPort(), manualGatewayReceiver.getEndPort());