Created
February 6, 2013 21:13
-
-
Save jrutley/4725910 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Scenario] | |
public class OfferToAgentSagaTest : SagaTestFixture<OfferedCallSaga> | |
{ | |
private Guid sagaId; | |
protected OfferToAgentSagaTest() | |
{ | |
LocalUri = new Uri("loopback://localhost/offer_to_agent"); | |
} | |
[Given] | |
public void PublishOfferToAgentMessage() | |
{ | |
sagaId = Guid.NewGuid(); | |
var agentId = Guid.NewGuid(); | |
LocalBus.Publish(new OfferToAgentMessage(sagaId, "messageID", agentId, DateTime.Now, TimeSpan.Zero)); | |
} | |
[Then] | |
public void TheSagaShouldBeInitialized() | |
{ | |
Assert.That(Saga.CorrelationId == sagaId); | |
} | |
[Finally] | |
public void Teardown() | |
{ | |
LocalBus.Dispose(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this but in my case Saga is coming null. Assert.That(Saga.CorrelationId == sagaId);
Do we need to create saga before we publish message ?