generated from mauroservienti/code-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ScenarioSnippets.cs
26 lines (23 loc) · 813 Bytes
/
ScenarioSnippets.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System.Threading.Tasks;
using NServiceBus.AcceptanceTesting;
using NServiceBus.IntegrationTesting;
using NUnit.Framework;
namespace ScenarioSnippets
{
public class When_sending_AMessage
{
// begin-snippet: scenario-skeleton
[Test]
public async Task AReplyMessage_is_received_and_ASaga_is_started()
{
var context = await Scenario.Define<IntegrationScenarioContext>()
.WithEndpoint<MyServiceEndpoint>(/*...*/)
.WithEndpoint<MyOtherServiceEndpoint>(/*...*/)
.Done(ctx=>false)
.Run();
}
class MyServiceEndpoint : EndpointConfigurationBuilder{ /* omitted */ }
class MyOtherServiceEndpoint : EndpointConfigurationBuilder{ /* omited */ }
// end-snippet
}
}