Exemple #1
0
 //needs formating
 private void SeeAllClaims()
 {
     Console.Clear();
     if (_repo.ClaimsCount() > 0)
     {
         Queue <Claims> allClaims = _repo.GetClaims();
         //Console.WriteLine($"\t Claim ID \t\t Type \t\t Description \t\t Amount \t\t Date Of Accident \t\t Date Of Claim \t\t Claim is Valid");
         //Console.WriteLine(".......................................................................................................................");
         foreach (Claims claim in allClaims)
         {
             Console.WriteLine($"\n\t ClaimID: #{claim.ClaimID}\n" +
                               $"\t Type: \t\t\t{claim.Type}\n" +
                               $"\t Description: \t\t{claim.Description}\n" +
                               $"\t Amount: \t\t${claim.Amount}\n" +
                               $"\t Date of Accident: \t{claim.DateOfAccident}\n" +
                               $"\t Date of Claim: \t{claim.DateOfClaim}\n" +
                               $"\t IsValid: \t\t{claim.IsValid}\n" +
                               $"..................................................................................");
             //Console.WriteLine($"\t {claim.ClaimID} \t\t {claim.Type} \t\t {claim.Description} \t\t {claim.Amount} \t\t {claim.DateOfAccident}} \t\t {claim.DateOfClaim} \t\t {claim.IsValid}\n");
         }
     }
     else
     {
         Console.WriteLine("\n\t Queue is empty ");
     }
 }
        public void AddClaimToListTest()
        {
            _claimsList.AddClaimToList(_claims);
            int expected = 1;
            int actual   = _claimsList.GetClaims().Count;

            Assert.AreEqual(expected, actual);
        }
Exemple #3
0
        public void AddTest()
        {
            Claim claim = new Claim(
                1, ClaimType.car, "test", 400m, new DateTime(2018, 4, 13), new DateTime(2017, 3, 4), false);

            _repo.AddClaim(claim);

            Console.WriteLine(claim.ClaimType);
            Console.WriteLine(_repo.GetClaims().Count);
        }
Exemple #4
0
 public void GetClaims()
 {
     Console.Clear();
     Console.WriteLine("ClaimId\t\t Type\t\t Description\t\t Amount\t\t DateOfAccident\t\t DateOfClaim\t\t IsValid\t\t");
     Queue <Claims> claims = _claimsRepo.GetClaims();
     {
         foreach (Claims claim in claims)
         {
             DisplayClaims(claim);
         }
     }
 }
        public void ReadClaims()
        {
            Claims     claim = new Claims();
            ClaimsRepo repo  = new ClaimsRepo();

            repo.AddClaim(claim);

            Queue <Claims> queue    = repo.GetClaims();
            bool           newQueue = queue.Contains(claim);

            Assert.IsTrue(newQueue);
        }
Exemple #6
0
        public void ShowClaims()
        {
            Console.Clear();

            Queue <ClaimsPoco> ViewAllClaims = _claimUIRepo.GetClaims();

            foreach (ClaimsPoco content in ViewAllClaims)
            {
                Console.WriteLine($"claim ID:{content.ClaimID}\n Description:{content.Description}\n " +
                                  $"Claim Amount:{content.ClaimAmount}\n Date of incident:{content.DateOfIncident}\n Date of claim:{content.DateOfClaim}\n" +
                                  $"Is Claim Valid:{content.IsValid}\n Type of claim:{content.TypeOfClaim}");
            }
        }
        private void ShowAllClaims()
        {
            Console.Clear();

            Queue <Claim> claims = _repo.GetClaims();

            foreach (Claim claim in claims)
            {
                DisplayClaims(claim);
            }

            Console.ReadKey();
        }