示例#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));
 }