예제 #1
0
 public void GetBy_ShouldReturnANotification_KeyExists()
 {
     _sut = new Notifier();
     _sut.AddNotification(new("key", "value"));
     Assert.NotNull(_sut.GetBy(x => x.Key == "key").First());
 }
예제 #2
0
 public void GetBy_ShouldReturnNull_KeyNotExists()
 {
     _sut = new Notifier();
     Assert.Null(_sut.GetBy(x => x.Key == "key"));
 }
예제 #3
0
 public void GetBy_MustThrowArgumentException_KeyIsNullOrEmpty()
 {
     _sut = new Notifier();
     Assert.Throws <ArgumentException>(() => _sut.GetBy(null));
 }