public async Task TestReceiveEventStatement() { var configuration = GetConfiguration(); var test = new MachineTestKit <M1>(configuration: configuration); await test.StartMachineAsync(); test.AssertIsWaitingToReceiveEvent(true); await test.SendEventAsync(new E1()); test.AssertIsWaitingToReceiveEvent(false); test.AssertInboxSize(0); }
public async Task TestMultipleReceiveEventStatementsUnordered() { var configuration = GetConfiguration(); var test = new MachineTestKit <M2>(configuration: configuration); await test.StartMachineAsync(); test.AssertIsWaitingToReceiveEvent(true); await test.SendEventAsync(new E2()); test.AssertIsWaitingToReceiveEvent(true); test.AssertInboxSize(1); await test.SendEventAsync(new E3()); test.AssertIsWaitingToReceiveEvent(true); test.AssertInboxSize(2); await test.SendEventAsync(new E1()); test.AssertIsWaitingToReceiveEvent(false); test.AssertInboxSize(0); }