public void ShouldRecognizePostTimeCardCommand(int employeeId, DateTime date, int hours) { var expectedPostTimeCardCommand = new PostTimeCardCommand(employeeId, date.Date, hours); var command = $"TimeCard {employeeId} {date:dd-MM-yyyy} {hours}"; var postTimeCardCommand = PostTimeCardCommandParser.Parse(command); postTimeCardCommand.Should().Be(expectedPostTimeCardCommand); }
public void ShouldErrorWhenCommandStructureIsInappropriate(string command) { Action commandExecutor = () => PostTimeCardCommandParser.Parse(command); commandExecutor.ShouldThrow <PostTimeCardCommandStructureException>(); }