Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        public Property DefaultNamedChannelHandler_should_not_support_any_events(SupportedEvent[] events)
        {
            var handler = new NamedChannelHandler("foo");

            return(events.All(x => !handler.SupportsEvent(x)).ToProperty());
        }