Esempio n. 1
0
 private void ViewAll()
 {
     Console.Clear();
     Console.WriteLine("ClaimID\tType\tDescription\tAmount \tDateOfAccident\tDateOfClaim\tIsValid");
     foreach (Claim claim in _claimRepo.GetAllClaims())
     {
         Console.WriteLine($"{claim.ClaimID}\t{claim.Type}\t{claim.Description}\t{claim.Amount}\t{claim.DateOfAccident}\t{claim.DateOfClaim}\t{claim.IsValid}");
     }
     Console.WriteLine("\nPress any key to continue...");
     Console.ReadKey();
 }
Esempio n. 2
0
        private void GetAllClaims()
        {
            Console.Clear();
            Queue <KomodoClaimsContent> listofContent = _kcRepo.GetAllClaims();

            foreach (KomodoClaimsContent content in listofContent)
            {
                DisplayContent(content);
            }
            Console.Write("Please press any key to continue");
            Console.ReadKey();
        }
        public void GetAllDirectory_ShouldReturnCorrectList()
        {
            KomodoClaimsContent testContent = new KomodoClaimsContent();
            KomodoClaimsRepo    repo        = new KomodoClaimsRepo();

            repo.AddClaimToDirectory(testContent);

            Queue <KomodoClaimsContent> testList = repo.GetAllClaims();
            bool directoryHasContent             = testList.Contains(testContent);

            Assert.IsTrue(directoryHasContent);
        }
Esempio n. 4
0
        public void GetAllClaims_ShouldReturnListOfClaims()
        {
            Claim            content = new Claim();
            KomodoClaimsRepo repo    = new KomodoClaimsRepo();

            repo.AddContentToDirectory(content);
            List <Claim> fullRepo = repo.GetAllClaims();

            bool directoryHasContents = fullRepo.Contains(content);

            Assert.IsTrue(directoryHasContents);
        }