Exemplo n.º 1
0
        public void AddClientTest()
        {
            // arrange
            IInsuranceCompany testInsuranceCompany = new InsuranceCompany();

            // act
            InsuranceAccount testClient = new InsuranceAccount();
            testInsuranceCompany.AddClient(testClient);

            // assert
            Assert.AreSame(testClient, testInsuranceCompany.Clients.LastOrDefault());
        }
Exemplo n.º 2
0
        public void InsurenceCompanyShouldPayBill()
        {
            // arrange
            IInsuranceCompany testInsuranceCompany = new InsuranceCompany();
            InsuranceAccount testClient = new InsuranceAccount();
            testInsuranceCompany.AddClient(testClient);
            decimal oldBalance = testInsuranceCompany.Clients.LastOrDefault().Balance;

            // act
            testInsuranceCompany.PayBill(testInsuranceCompany.Clients.LastOrDefault(), new Bill());

            // assert
            Assert.IsTrue(oldBalance > testInsuranceCompany.Clients.LastOrDefault().Balance);
        }
Exemplo n.º 3
0
 public void PayBill(InsuranceAccount client , Bill bill)
 {
     BillIsPayed.Invoke(client);
 }
Exemplo n.º 4
0
 public void AddClient(InsuranceAccount client)
 {
     Clients.Add(client);
 }
Exemplo n.º 5
0
 private void BillIsPayed(InsuranceAccount account)
 {
     PatientBill.IsPayed = true;
 }
Exemplo n.º 6
0
 private void BillIsPayed(InsuranceAccount account)
 {
     PatientBill.IsPayed = true;
 }
Exemplo n.º 7
0
 public void PayBill(InsuranceAccount client, Bill bill)
 {
     BillIsPayed.Invoke(client);
 }
Exemplo n.º 8
0
 public void AddClient(InsuranceAccount client)
 {
     Clients.Add(client);
 }