public void TestNoEventsAreFiredIfAllGeneratorsPrioirtyIsOff()
        {
            _eventProducer.ExecuteTask();
            _messageBuilderConsumer.ExecuteTask();

            var sentMessages = ClientMock.GetMessages();

            Assert.AreEqual(0, sentMessages.Count);
        }
        public void TestOperationalEventIsNotFiredIfAMessageIsNotFired()
        {
            Twin.ChangeEventPriority(typeof(FakeOperationalEvent).Name, EventPriority.Operational)
            .ChangeEventPriority(typeof(FakePeriodicEvent).Name, EventPriority.Off)
            .ChangeEventPriority(typeof(FakeTriggeredEvent).Name, EventPriority.Off)
            .UpdateAgentTwinConfiguration();

            var expectedOperationalEvent = FakesEventsFactory.CreateFakeOperationalEvent();
            var expectedPeriodicEvent    = FakesEventsFactory.CreateFakePeriodicEvent(EventPriority.High);
            var expectedTriggeredEvent   = FakesEventsFactory.CreateFakeTriggeredEvent(EventPriority.Low);

            FakeOperationalEventGenerator.SetEvents(new[] { expectedOperationalEvent });
            FakeSnapshotEventGenerator.SetEvents(new[] { expectedPeriodicEvent });
            FakeTriggeredEventGenerator.SetEvents(new[] { expectedTriggeredEvent });

            _eventProducer.ExecuteTask();
            _eventProducer.ExecuteTask();

            _messageBuilderConsumer.ExecuteTask();

            var sentMessages = ClientMock.GetMessages();

            Assert.AreEqual(0, sentMessages.Count);
        }