public void ShouldHaveADefaultValue() { var timeEntry = new MockTimeEntry(); var calendarItem = CalendarItem.From(timeEntry); calendarItem.Color.Should().Be(Colors.NoProject); }
public void SetsTheAppropriateCalendarIconKind(SyncStatus syncStatus, CalendarIconKind expectedCalendarIcon) { var timeEntry = new MockTimeEntry { SyncStatus = syncStatus }; var calendarItem = CalendarItem.From(timeEntry); calendarItem.IconKind.Should().Be(expectedCalendarIcon); }
public void ShouldBeTakenFromTimeEntry(long duration) { var timeEntry = new MockTimeEntry { Duration = duration }; var calendarItem = CalendarItem.From(timeEntry); calendarItem.Duration.Should().Be(TimeSpan.FromSeconds(duration)); }
public void ShouldUseDefaultValueIfPassedAnInvalidColor() { var timeEntry = new MockTimeEntry { Project = new MockProject { Color = "#fa" } }; var calendarItem = CalendarItem.From(timeEntry); calendarItem.Color.Should().Be(Colors.NoProject); }
public void ShouldInheritFromTimeEntryProjectColor() { var timeEntry = new MockTimeEntry { Project = new MockProject { Color = "#666666" } }; var calendarItem = CalendarItem.From(timeEntry); calendarItem.Color.Should().Be("#666666"); }
public void ShouldReturnTheExpectedForegroundColor(string color, string expectedColor) { var timeEntry = new MockTimeEntry { Project = new MockProject { Color = color } }; var calendarItem = CalendarItem.From(timeEntry); var foregroundColor = calendarItem.ForegroundColor(); foregroundColor.Should().BeEquivalentTo(new Color(expectedColor)); }