public void AddClaim_ShouldGetCorrectBoolean()
        {
            //ARRANGE
            ClaimItems           newClaim = new ClaimItems();
            ClaimItemsRepository repo     = new ClaimItemsRepository();

            //ACT
            bool addResult = repo.AddNewClaim(newClaim);

            //ASSERT
            Assert.IsTrue(addResult);
        }
        public void GetAllClaims_ShouldReturnCorrectListOfClaims()
        {
            //ARRANGE
            ClaimItems           newObject  = new ClaimItems();
            ClaimItemsRepository repository = new ClaimItemsRepository();

            repository.AddNewClaim(newObject);

            //ACT
            List <ClaimItems> listOfClaimItems = repository.GetAllClaims();

            //ASSERT
            bool claimHasItems = listOfClaimItems.Contains(newObject);

            Assert.IsTrue(claimHasItems);
        }
 public void Arrange()
 {
     _repo    = new ClaimItemsRepository();
     _content = new ClaimItems(4, ClaimType.Car, "Wreck on I-70.", 2000f, new DateTime(18, 04, 27), new DateTime(18, 04, 28), true);
     _repo.AddNewClaim(_content);
 }
        private void EnterNewClaim()
        {
            Console.Clear();
            ClaimItems content = new ClaimItems();

            //Claim ID
            Console.ForegroundColor = ConsoleColor.DarkMagenta;
            Console.WriteLine("Enter the claim id:");
            Console.ForegroundColor = ConsoleColor.Cyan;
            content.ClaimId         = int.Parse(Console.ReadLine());
            Console.WriteLine();

            //Claim Type
            Console.ForegroundColor = ConsoleColor.DarkMagenta;
            Console.WriteLine("Enter the claim type:");
            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.WriteLine("1) Car\n" +
                              "2) Home\n" +
                              "3) Theft");
            string type = Console.ReadLine();

            switch (type)
            {
            case "1":
                content.Type = ClaimType.Car;
                break;

            case "2":
                content.Type = ClaimType.Home;
                break;

            case "3":
                content.Type = ClaimType.Theft;
                break;
            }
            Console.WriteLine();

            //Description
            Console.ForegroundColor = ConsoleColor.DarkMagenta;
            Console.WriteLine("Enter a claim description:");
            Console.ForegroundColor = ConsoleColor.Cyan;
            string description = Console.ReadLine();

            content.Description = description;
            Console.WriteLine();

            //Amount
            Console.ForegroundColor = ConsoleColor.DarkMagenta;
            Console.WriteLine("Amount of Damage:");
            Console.ForegroundColor = ConsoleColor.Cyan;
            content.Amount          = float.Parse(Console.ReadLine());
            Console.WriteLine();

            //Date Of Accident
            Console.ForegroundColor = ConsoleColor.DarkMagenta;
            Console.WriteLine("Date of Accident (eg. mm/dd/yy):");
            Console.ForegroundColor = ConsoleColor.Cyan;
            string accidentInput = Console.ReadLine();
            var    accidentDate  = DateTime.Parse(accidentInput);

            content.DateOfAccident = accidentDate;
            Console.WriteLine();

            //Date Of Claim
            Console.ForegroundColor = ConsoleColor.DarkMagenta;
            Console.WriteLine("Date of Claim (eg. mm/dd/yy):");
            Console.ForegroundColor = ConsoleColor.Cyan;
            string claimInput = Console.ReadLine();
            var    claimDate  = DateTime.Parse(claimInput);

            content.DateOfClaim = claimDate;


            _claimItemsRepo.AddNewClaim(content);
        }