test state reset moved to SetUp() method to ensure all tests can be run together

This commit is contained in:
sbohlen
2010-09-21 19:18:30 +00:00
parent abc23e2615
commit 20196ec91f

View File

@@ -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");