protected Property CheckEventInQueue(NamedChannelHandler mFirst, SupportedEvent e, Property prop, Queue <Tuple <string, SupportedEvent> > eventQueue) { if (mFirst.SupportsEvent(e)) { var outcome = eventQueue.SequenceEqual(new[] { new Tuple <string, SupportedEvent>(mFirst.Name, e) }); prop = prop.And(() => outcome) .Label( $"[{GetType()}] {mFirst} {(mFirst.SupportsEvent(e) ? "does" : "does not")} support {e}, but found that queue contained {string.Join(",", eventQueue)}"); } return(prop); }
public Property DefaultNamedChannelHandler_should_not_support_any_events(SupportedEvent[] events) { var handler = new NamedChannelHandler("foo"); return(events.All(x => !handler.SupportsEvent(x)).ToProperty()); }