public void ShouldRecognizeChangeEmployeeToUnionMemberCommand(int id, int memberId, decimal commissionRate) { var expectedChangeEmployeeToUnionMemberCommand = new ChangeEmployeeToUnionMemberCommand(id, memberId, commissionRate); var command = $"ChgEmp {id} Member {memberId} Dues {commissionRate}"; var changeEmployeeToUnionMemberCommand = ChangeEmployeeToUnionMemberCommandParser.Parse(command); changeEmployeeToUnionMemberCommand.Should().Be(expectedChangeEmployeeToUnionMemberCommand); }
public void ShouldErrorWhenCommandStructureIsInappropriate(string command) { Action action = () => ChangeEmployeeToUnionMemberCommandParser.Parse(command); action.ShouldThrow <ChangeEmployeeToUnionMemberCommandStructureException>(); }