public void Clear_ShouldRemoveAllNotifications() { _sut = new Notifier(); List <Notification> notifications = new() { new("any_key", "any_message"), new("any_key", "any_message") }; _sut.AddNotifications(notifications); _sut.Clear(); Assert.False(_sut.HasNotifications()); }
protected bool IsValid() { if (_notifier.HasNotifications()) { foreach (var erro in _notifier.GetNotifications()) { _toastNotification.AddErrorToastMessage(erro.Message); } return(false); } return(true); }
protected bool ValidOperation() { return(!_notifier.HasNotifications()); }
protected bool IsOperationValid() { return(!_notifier.HasNotifications()); }
protected bool OperacaoValida() => !_notifier.HasNotifications();
public void HasNotifications_MustReturnFalse_NoNotificationIsAdded() { _sut = new Notifier(); Assert.False(_sut.HasNotifications()); }
public void HasNotifications_MustReturnTrue_AnyNotificationIsAdded() { _sut = new Notifier(); _sut.AddNotification(new("any_key", "any_message")); Assert.True(_sut.HasNotifications()); }
protected bool OperacaoValida() { return(!_notifier.HasNotifications()); }