public void IsToolTipVisible_Raises_PropertyChanged() { var model = new NotificationIndicatorViewModel(); model.MonitorEvents(); model.IsToolTipVisible = true; model.IsToolTipVisible.Should().BeTrue(); model.ShouldRaisePropertyChangeFor(x => x.IsToolTipVisible); }
public void AreNotificationsEnabled_Raises_PropertyChanged() { var model = new NotificationIndicatorViewModel(); model.MonitorEvents(); model.AreNotificationsEnabled = true; model.AreNotificationsEnabled.Should().BeTrue(); model.ShouldRaisePropertyChangeFor(x => x.AreNotificationsEnabled); }
public void HasUnreadEvents_Raises_PropertyChanged() { var model = new NotificationIndicatorViewModel(); model.MonitorEvents(); model.HasUnreadEvents = true; model.HasUnreadEvents.Should().BeTrue(); model.ShouldRaisePropertyChangeFor(x => x.HasUnreadEvents); }
public void Text_Raises_PropertyChanged() { var model = new NotificationIndicatorViewModel(); model.MonitorEvents(); model.ToolTipText = "test"; model.ToolTipText.Should().Be("test"); model.ShouldRaisePropertyChangeFor(x => x.ToolTipText); }
public void HasUnreadEvents_WithNo_Events_UpdatesTooltipText() { var model = new NotificationIndicatorViewModel(); model.MonitorEvents(); model.IsIconVisible = true; model.AreNotificationsEnabled = true; model.IsToolTipVisible = true; model.ShouldRaisePropertyChangeFor(x => x.IsToolTipVisible); model.ToolTipText.Should().Be("You have no unread events."); }
public void HasUnreadEvents_WithEvents_UpdatesTooltipText() { var timerMock = new Mock <ITimer>(); var model = new NotificationIndicatorViewModel(a => a(), timerMock.Object); model.MonitorEvents(); model.IsIconVisible = true; model.AreNotificationsEnabled = true; model.IsToolTipVisible = true; model.SetNotificationEvents(testEvents); model.ShouldRaisePropertyChangeFor(x => x.IsToolTipVisible); model.ToolTipText.Should().Be("You have 1 unread event."); }