public void ShouldRecognizeRunPayrollCommand(DateTime date) { var expectedRunPayrollCommand = new RunPayrollCommand(date.Date); var command = $"Payday {date:dd-MM-yyyy}"; var runPayrollCommand = RunPayrollCommandParser.Parse(command); runPayrollCommand.Should().Be(expectedRunPayrollCommand); }
public void ShouldErrorWhenCommandStructureIsInappropriate(string command) { Action commandExecutor = () => RunPayrollCommandParser.Parse(command); commandExecutor.ShouldThrow <RunPayrollCommandStructureException>(); }