public void FireAnotherStateChange(
     Action<DomainEvent> inspector
 )
 {
     var evt = new AnotherEvent();
     RaiseEvent(evt);
     inspector(evt);
 }
示例#2
0
        public void FireAnotherStateChange(
            Action <DomainEvent> inspector
            )
        {
            var evt = new AnotherEvent();

            RaiseEvent(evt);
            inspector(evt);
        }
    public void DefaultingDispatcherDeserializesCorrectly()
    {
        using (var publisher = new EventPublisher())
            using (var target = new DefaultingDispatcherMock())
            {
                target.Open();

                var evt = new AnotherEvent()
                {
                    SomeValue = 7
                };
                publisher.Publish(evt);

                Thread.Sleep(100);

                Assert.Equal(true, target.DefaultHandlerHasBeenCalled);

                Assert.Equal(7, target.DefaultHandlerObject.Value <int>("SomeValue"));
                Assert.Equal("Dummy.AnotherEvent", target.DefaultHandlerObject.Value <string>("RoutingKey"));
                Assert.Equal(evt.Timestamp, target.DefaultHandlerObject.Value <long>("Timestamp"));
                Assert.Equal("InfoSupport.WSA.Infrastructure.Test.dummies.AnotherEvent", target.DefaultHandlerObject.Value <string>("TypeName"));
            }
    }
示例#4
0
 void On(AnotherEvent @event)
 {
     AnotherEventOnCalled++;
 }
示例#5
0
 protected void Apply(AnotherEvent evt)
 {
 }
 public void Apply(AnotherEvent e)
 {
 }
 protected void Apply(AnotherEvent evt)
 {
 }
示例#8
0
文件: BusTests.cs 项目: Meberem/fixie
 public void Handle(AnotherEvent message)
 => Log <CombinationEventHandler, AnotherEvent>(message.Id);
 public void Handle(IViewContext context, AnotherEvent domainEvent)
 {
     ProcessedEvents++;
 }