public void notification_fired_every_invalid_message() { var observer = new MockObserver(); testRecorder.RegisterObserver(observer); testRecorder.Do("nonvalue key 2"); Assert.That(observer.InvalidCalled); }
public void notification_fired_every_valid_message() { var observer = new MockObserver(); testRecorder.RegisterObserver(observer); testRecorder.Do("value key 2"); Assert.That(observer.Called); Assert.That(observer.Added, Is.EquivalentTo(new[] { "key" })); Assert.That(observer.Removed, Is.EquivalentTo(new string[] {})); }