Exemplo n.º 1
0
        public static void ShouldBeNotifyCompetitorSelectCancelled(this EventArgsWithName <NumberEntryFilter> eventArgsWithName, bool isCurrentCompetitor)
        {
            Guard.NotNull(eventArgsWithName, nameof(eventArgsWithName));

            eventArgsWithName.Name.Should().Be("NotifyCompetitorSelectCancelled");
            eventArgsWithName.EventArgs.Should().BeOfType <CompetitorSelectionEventArgs>();

            var competitorSelectionEventArgs = (CompetitorSelectionEventArgs)eventArgsWithName.EventArgs;

            competitorSelectionEventArgs.IsCurrentCompetitor.Should().Be(isCurrentCompetitor);
        }
Exemplo n.º 2
0
        public static void ShouldBeNotifyUnknownAction(this EventArgsWithName <NumberEntryFilter> eventArgsWithName, WirelessNetworkAddress source,
                                                       RemoteKey?key, TimeSpan?time)
        {
            Guard.NotNull(eventArgsWithName, nameof(eventArgsWithName));
            Guard.NotNull(source, nameof(source));

            eventArgsWithName.Name.Should().Be("NotifyUnknownAction");
            eventArgsWithName.EventArgs.Should().BeOfType <UnknownDeviceActionEventArgs>();

            var unknownDeviceActionEventArgs = (UnknownDeviceActionEventArgs)eventArgsWithName.EventArgs;

            unknownDeviceActionEventArgs.Source.Should().Be(source);
            unknownDeviceActionEventArgs.Key.Should().Be(key);
            unknownDeviceActionEventArgs.SensorTime.Should().Be(time);
        }