public void InterpretDeleteMessage_canInterpretDifferentTimeTypeAndDayDeletion(TimeEntryTypeEnum timeEntryType) { var sut = new DeleteInterpreter().InterpretMessage(ToPayload("delete " + timeEntryType.GetDescription() + " jan-17")); var now = DateTime.UtcNow; sut.Date.Year.Should().Be(now.Year); sut.Date.Month.Should().Be(1); sut.Date.Day.Should().Be(17); sut.TimeEntryType.Should().Be(timeEntryType); }
public void InterpretDeleteMessage_canInterpretDeleteSpecificDay() { var sut = new DeleteInterpreter().InterpretMessage(ToPayload("delete jan-17")); var now = DateTime.UtcNow; sut.Date.Year.Should().Be(now.Year); sut.Date.Month.Should().Be(1); sut.Date.Day.Should().Be(17); sut.TimeEntryType.HasValue.Should().BeFalse(); }