Exemple #1
0
        public void Arrange()
        {
            string   dateOneFirst  = "4/25/18";
            DateTime date1         = DateTime.Parse(dateOneFirst);
            string   dateOneSecond = "4/27/18";
            DateTime date2         = DateTime.Parse(dateOneSecond);

            _content = new KomodoClaims(1, "Car", "Car accident on 465.", 400.00, date1, date2, true);
            _repo    = new KomodoClaimsRepository();

            _repo.EnterNewClaimInfo(_content);
        }
Exemple #2
0
        private void TakeCareOfNextClaim()
        {
            string       dateOneFirst  = "4/25/18";
            DateTime     date1         = DateTime.Parse(dateOneFirst);
            string       dateOneSecond = "4/27/18";
            DateTime     date2         = DateTime.Parse(dateOneSecond);
            KomodoClaims one           = new KomodoClaims(1, "Car", "Car accident on 465.", 400.00, date1, date2, true);

            _contentRepo.EnterNewClaimInfo(one);

            List <KomodoClaims> listOfKomodoClaims = _contentRepo.SeeAllKomodoClaims();

            foreach (KomodoClaims item in listOfKomodoClaims)
            {
                Console.WriteLine($"Claim ID:\n{item.ClaimId}" + $"Type:\n{item.ClaimType}" + $"Description{item.ClaimDescription}\n" + $"Amount{item.ClaimAmount}\n" + $"Date of Accident{item.DateOfAccident}\n" + $"Date of Claim{item.DateOfClaim}\n" + $"Is Valid?\n{item.IsValid}");
                Console.WriteLine("Take care of this Claim (y/n)");
                string input = Console.ReadLine();


                switch (input)
                {
                case "y":
                    Console.WriteLine("Claim taken care of!");
                    Console.WriteLine("Press enter to continue...");
                    Console.ReadLine();
                    Console.Clear();
                    break;

                case "n":
                    //SeeClaimTwo();
                    break;

                default:
                    Console.WriteLine("Please enter y or n");
                    break;
                }
            }
        }
Exemple #3
0
        public void EnterNewClaim_ReturnNotNull()
        {
            KomodoClaims content = new KomodoClaims();

            content.ClaimType = "Car";
            KomodoClaimsRepository repository = new KomodoClaimsRepository();



            repository.EnterNewClaimInfo(content);
            string   dateOneFirst  = "4/25/18";
            DateTime date1         = DateTime.Parse(dateOneFirst);
            string   dateOneSecond = "4/27/18";
            DateTime date2         = DateTime.Parse(dateOneSecond);

            // KomodoClaims contentFromClaim = repository.EnterNewClaimInfo("Car");

            Assert.IsNotNull(content);
        }