public void is_saga_handler_positive()
        {
            StatefulSagaConvention.IsSagaHandler(HandlerCall.For <SimpleSagaHandler>(x => x.Start(null)))
            .ShouldBeTrue();

            StatefulSagaConvention.IsSagaHandler(HandlerCall.For <SimpleSagaHandler>(x => x.Second(null)))
            .ShouldBeTrue();

            StatefulSagaConvention.IsSagaHandler(HandlerCall.For <SimpleSagaHandler>(x => x.Last(null)))
            .ShouldBeTrue();
        }
Exemple #2
0
 /// <summary>
 /// Find Handlers suffixed with 'Saga' that have public properties of 'State' and 'IsCompleted'
 /// </summary>
 public void IncludeClassesMatchingSagaConvention()
 {
     _description.WriteLine("Public classes suffixed with Saga that have public properties of 'State' and 'IsCompleted'");
     IncludeTypes(x => StatefulSagaConvention.IsSagaHandler(x));
 }
 public void is_saga_handler_negative()
 {
     StatefulSagaConvention.IsSagaHandler(HandlerCall.For <SimpleHandler <OneMessage> >(x => x.Handle(null)))
     .ShouldBeFalse();
 }