Пример #1
0
            public TestSuccessSaga(FakeService fakeService)
            {
                Step("step 1@")
                .WithAction(c => fakeService.Method1());

                Step("step 2@")
                .WithAction(c => fakeService.Method2());

                Step("step 3@")
                .WithAction(c => fakeService.Method3());
            }
Пример #2
0
            public TestFailedSagaWithTurningStep(FakeService fakeService) : base("TestFailedSagaWithTurningStep")
            {
                Step("step 1")
                .WithAction(c => fakeService.Method1())
                .WithCompensation(c => fakeService.Method1());

                Step("step 2", StepType.Turning)
                .WithAction(c => fakeService.Method2())
                .WithCompensation(c => fakeService.Method2());

                Step("step 3")
                .WithAction(c => throw new AbortSagaExecutingException())
                .WithCompensation(c => fakeService.Method3());
            }
Пример #3
0
            public TestFailedSaga(FakeService fakeService)
            {
                Step("step 1#")
                .WithAction(c => fakeService.Method1())
                .WithCompensation(c => fakeService.Method1());

                Step("step 2#")
                .WithAction(c => fakeService.Method2())
                .WithCompensation(c => fakeService.Method2());

                Step("step 3#")
                .WithAction(c => throw new AbortSagaExecutingException())
                .WithCompensation(c => fakeService.Method3());
            }