public void StopListening_NoMoreResponsesReceived()
        {
            const string expectedKey  = "key";
            var          registration = new EventOfInterestRegistration(expectedKey, FirstResponse, EEventOfInterestType.Persistant);

            _service.ListenForEventOfInterest(registration);
            _service.StopListeningForEventOfInterest(registration);

            _service.RecordEventOfInterest(expectedKey);

            Assert.IsFalse(_firstEventTriggered);
        }
Ejemplo n.º 2
0
        private void RegisterForEventsOfInterest()
        {
            var eventsOfInterest = _eventsOfInterestService.Get();

            _registrations = new List <EventOfInterestRegistration>(_chatterEntries.Count);
            foreach (var chatterEntry in _chatterEntries)
            {
                var registration = new EventOfInterestRegistration(chatterEntry.Key, OnEventOfInterest, chatterEntry.Value.ChatterType);
                eventsOfInterest.ListenForEventOfInterest(registration);
                _registrations.Add(registration);
            }
        }
Ejemplo n.º 3
0
 public void StopListeningForEventOfInterest(EventOfInterestRegistration registration)
 {
     StopListeningEvents.Add(registration);
 }
Ejemplo n.º 4
0
 public void ListenForEventOfInterest(EventOfInterestRegistration registration)
 {
     ListenedEvents.Add(registration);
 }