public void NotificationIsRequired_When_PreviousState_Changed() { var item = new WidgetMock { ShowNotifications = true, State = State.Ok }; item.State = item.State; Assert.IsFalse(item.IsNotificationRequired()); item.State = State.Error; Assert.IsTrue(item.IsNotificationRequired()); }
public void NotificationIsRequired_When_ShowNotifications_Is_True() { var item = new WidgetMock { ShowNotifications = false, State = State.Ok }; item.State = State.Error; Assert.IsFalse(item.IsNotificationRequired()); item.ShowNotifications = true; Assert.IsTrue(item.IsNotificationRequired()); }
public void NotificationNotIsRequired_When_ShowErrorNotificationsFalse_And_State_Is_Error() { var widget = new WidgetMock { ShowNotifications = true, ShowErrorNotifications = false, State = State.Ok }; widget.State = State.Error; Assert.IsFalse(widget.IsNotificationRequired()); widget.State = State.Ok; Assert.IsFalse(widget.IsNotificationRequired()); }
public void NotificationIsRequired_When_PreviousState_IsNotNullOrNone() { var item = new WidgetMock { ShowNotifications = true, }; Assert.IsFalse(item.IsNotificationRequired()); item.State = State.Ok; Assert.IsFalse(item.IsNotificationRequired()); item.State = State.Error; Assert.IsTrue(item.IsNotificationRequired()); }