From 3433fe35df379b3ef675135685fed20eb76e49a7 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 3 May 2016 17:25:35 +0200 Subject: [PATCH] Fix assertion failure messages in TransactionalTestExecutionListenerTests --- .../TransactionalTestExecutionListenerTests.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-test/src/test/java/org/springframework/test/context/transaction/TransactionalTestExecutionListenerTests.java b/spring-test/src/test/java/org/springframework/test/context/transaction/TransactionalTestExecutionListenerTests.java index c09060bb55..31975c73fd 100644 --- a/spring-test/src/test/java/org/springframework/test/context/transaction/TransactionalTestExecutionListenerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/transaction/TransactionalTestExecutionListenerTests.java @@ -82,7 +82,7 @@ public class TransactionalTestExecutionListenerTests { given(testContext.getTestInstance()).willReturn(instance); given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("transactionalTest")); - assertFalse("callback not have been invoked", instance.invoked()); + assertFalse("callback should not have been invoked", instance.invoked()); TransactionContextHolder.removeCurrentTransactionContext(); listener.beforeTestMethod(testContext); assertEquals(invokedInTx, instance.invoked()); @@ -95,10 +95,10 @@ public class TransactionalTestExecutionListenerTests { given(testContext.getTestInstance()).willReturn(instance); given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("nonTransactionalTest")); - assertFalse("callback not have been invoked", instance.invoked()); + assertFalse("callback should not have been invoked", instance.invoked()); TransactionContextHolder.removeCurrentTransactionContext(); listener.beforeTestMethod(testContext); - assertFalse("callback not have been invoked", instance.invoked()); + assertFalse("callback should not have been invoked", instance.invoked()); } private void assertAfterTestMethod(Class clazz) throws Exception { @@ -114,10 +114,10 @@ public class TransactionalTestExecutionListenerTests { given(tm.getTransaction(BDDMockito.any(TransactionDefinition.class))).willReturn(new SimpleTransactionStatus()); - assertFalse("callback not have been invoked", instance.invoked()); + assertFalse("callback should not have been invoked", instance.invoked()); TransactionContextHolder.removeCurrentTransactionContext(); listener.beforeTestMethod(testContext); - assertFalse("callback not have been invoked", instance.invoked()); + assertFalse("callback should not have been invoked", instance.invoked()); listener.afterTestMethod(testContext); assertTrue("callback should have been invoked", instance.invoked()); } @@ -128,11 +128,11 @@ public class TransactionalTestExecutionListenerTests { given(testContext.getTestInstance()).willReturn(instance); given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("nonTransactionalTest")); - assertFalse("callback not have been invoked", instance.invoked()); + assertFalse("callback should not have been invoked", instance.invoked()); TransactionContextHolder.removeCurrentTransactionContext(); listener.beforeTestMethod(testContext); listener.afterTestMethod(testContext); - assertFalse("callback not have been invoked", instance.invoked()); + assertFalse("callback should not have been invoked", instance.invoked()); } private void assertTransactionConfigurationAttributes(Class clazz, String transactionManagerName, @@ -175,7 +175,7 @@ public class TransactionalTestExecutionListenerTests { given(testContext.getTestInstance()).willReturn(instance); given(testContext.getTestMethod()).willReturn(clazz.getDeclaredMethod("transactionalTest")); - assertFalse("callback not have been invoked", instance.invoked()); + assertFalse("callback should not have been invoked", instance.invoked()); TransactionContextHolder.removeCurrentTransactionContext(); try {