private void AddNewClaim() { Console.Clear(); KomodoClaim newClaim = new KomodoClaim(); Console.WriteLine("Enter the number associated with the claim type from the following:\n" + "1.Car\n" + "2.Home\n" + "3.Theft."); int claimType = int.Parse(Console.ReadLine()); newClaim.ClaimType = (ClaimTypeEnum)claimType; Console.WriteLine("Enter a description of the claim."); newClaim.Description = Console.ReadLine(); Console.WriteLine("Enter the amount requested for the claim using numbers and decimals only to represent the value."); newClaim.ClaimAmount = decimal.Parse(Console.ReadLine()); Console.WriteLine("Enter the date of the incident using the following format: MM / DD / YYYY"); newClaim.DateOfIncident = DateTime.Parse(Console.ReadLine()); Console.WriteLine("Enter the date of the claim using the following format: MM / DD / YYYY"); newClaim.DateOfClaim = DateTime.Parse(Console.ReadLine()); _claimRepo.AddClaim(newClaim); }
public void Arrange() { _repo = new KomodoClaimRepo(); _claim = new KomodoClaim(ClaimTypeEnum.Home, "My house caught on fire.", 5000, new DateTime(2020, 12, 14), new DateTime(2020, 12, 15)); _repo.AddClaim(_claim); }