public void MakePayment(double amount, BankingAccountNumber recipient) { if (new Random().Next(100) <= 50) { throw new PaymentServiceException("Error while accessing the ACME payment service."); } }
public void ConfigurerEntrepriseAvecAlice() { paymentService = Mock.Of <IPaymentService>(); aliceAccount = new BankingAccountNumber(); alice = new Employee(aliceAccount, ALICE_SALAIRE_ANNUEL); }
public Employee(BankingAccountNumber bankingAccount, double annualSalary) { this.bankingAccount = bankingAccount; this.annualSalary = annualSalary; }