public StockHub(ScritchyBus bus, StockDictionary dict) { InitializeCommands(); this.bus = bus; this.dict = dict; bus.ApplyNewEventsToAllHandlers(); }
protected static void ApplyEvents(params object[] events) { SUT.EventStore.SaveEvents(events); SUT.ApplyNewEventsToAllHandlers(); // make sure GetNewEvents only returns events launched after all these events PublishedEvents.AddRange(SUT.EventStore.GetNewEvents()); PublishedEvents.Clear(); }