From 20196ec91f9603310f962390b6ec9da2ac1697e9 Mon Sep 17 00:00:00 2001 From: sbohlen Date: Tue, 21 Sep 2010 19:18:30 +0000 Subject: [PATCH] test state reset moved to SetUp() method to ensure all tests can be run together --- .../NonTransactionalMessageListenerContainerTests.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/Spring/Spring.Messaging.Tests/Messaging/Listener/NonTransactionalMessageListenerContainerTests.cs b/test/Spring/Spring.Messaging.Tests/Messaging/Listener/NonTransactionalMessageListenerContainerTests.cs index a0c0ac8b..2b8740c3 100644 --- a/test/Spring/Spring.Messaging.Tests/Messaging/Listener/NonTransactionalMessageListenerContainerTests.cs +++ b/test/Spring/Spring.Messaging.Tests/Messaging/Listener/NonTransactionalMessageListenerContainerTests.cs @@ -48,7 +48,12 @@ namespace Spring.Messaging.Listener { MessageQueueUtils.RecreateMessageQueue(@".\Private$\testqueue", false); MessageQueueUtils.RecreateMessageQueue(@".\Private$\testresponsequeue", false); + base.SetUp(); + + //Reset the state so that running all tests together will succeed. + exceptionHandler.MessageCount = 0; + listener.MessageCount = 0; } public SimpleExceptionHandler ExceptionHandler @@ -71,10 +76,6 @@ namespace Spring.Messaging.Listener [Test] public void SendAndAsyncReceiveWithExceptionHandling() { - //Reset the state so that running all tests together will succeed. - exceptionHandler.MessageCount = 0; - - MessageQueueTemplate q = applicationContext["testQueueTemplate"] as MessageQueueTemplate; Assert.IsNotNull(q); q.ConvertAndSend("Goodbye World 1");