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