public void Arrange() { _repo = new ClaimRepo(); _data = new ClaimLibrary(1, "Car", "Car Accident on 465", 400.00, new DateTime(18, 04, 25), new DateTime(18 / 04 / 27), true); _repo.AddDataToList(_data); }
public void Arrange() { _claimDirectory = new ClaimRepo(); _claim = new Claim("1", ClaimType.Car, "Car accident on 465", 400.00, DateTime.Parse("2018-04-25"), DateTime.Parse("2018-04-27"), true); _claimDirectory.AddClaimToQueue(_claim); }
public void Arrange() { _repo = new ClaimRepo(); _claim = new Claim(1, ClaimType.Car, "Car accident on 465.", 400.00m, new DateTime(2018, 04, 25), new DateTime(2018, 04, 27), true); _repo.AddClaimToQueue(_claim); }
public void Arrange() { _claimRepo = new ClaimRepo(); _claim = new Claim((ClaimType)3, "Stolen swag", 4.00m, new DateTime(2018, 12, 30), new DateTime(2019, 01, 31)); _claimRepo.AddClaimToQueue(_claim); }
public void TestCleanup() { _repo = null; claimOne = null; claimTwo = null; claimThree = null; }
public void Arrange() { _repo = new ClaimRepo(); _claim = new Claim(3, TypeOfClaim.Home, "stolen ring", 200.00, DateTime.Parse("12/24/2017"), DateTime.Parse("01/05/2018")); _repo.CreateANewClaimToQueue(_claim); }
public void UpdateTest() { //Set test Claim newClaim = new Claim(); newClaim.ClaimId = "1"; newClaim.ClaimType = ClaimType.Car; newClaim.Description = "Accident on I-69"; newClaim.DateOfIncident = new DateTime(2020, 1, 18); newClaim.DateOfClaim = new DateTime(2020, 1, 30); ClaimRepo newClaimRepo = new ClaimRepo(); //Can you add it ok newClaimRepo.AddClaimToLists(newClaim); //Update test newClaim.Description = "Accident on I-70"; newClaimRepo.UpdateExistingClaim("1", newClaim); //Does description update string expected2 = "Accident on I-70"; string actual2 = newClaim.Description; Assert.AreEqual(expected2, actual2); //Updated without issue }
public void Arrange() { _claimRepo = new ClaimRepo(); _claim = new Claim(1, ClaimType.Car, "crash", 400.00m, new DateTime(2020, 12, 15), new DateTime(2020, 12, 16)); _claimRepo.EnqueueToDatabase(_claim); _claimItems = _claimRepo.GetAllClaims(); }
public void Arrange() { _claimRepo = new ClaimRepo(); _claim = new Claim("TestClaim"); _claimRepo.AddNewClaim(_claim); }
public void TestNextClaim_DesplaysNextClaimInList() { ClaimRepo repo = new ClaimRepo(); repo.AddClaim(ID, claimType, description, amount, incident, claim); Assert.IsTrue(repo.ShowNextClaim()); }
public void TestAddClaimAndSeeClaims_AddClaimToListAndDisplay() { ClaimRepo repo = new ClaimRepo(); repo.AddClaim(ID, claimType, description, amount, incident, claim); Assert.IsTrue(repo.SeeClaims()); }
public void Arrange() { _repo = new ClaimRepo(); _content = new Claim(4, ClaimType.Theft, "Stole the Crown Jewels", "$1,000,000,000,", new DateTime(2020, 7, 28), new DateTime(2020, 8, 30), false); _repo.AddClaimToQueue(_content); }
public void Test_SeeAllClaims() { var claimrepo = new ClaimRepo(); claimrepo.SeeAllClaims(); Assert.IsNotNull(_claims); }
public void DefaultValues() { _repo = new ClaimRepo(); _content = new ClaimContent(1, TypesOfClaims.Car, "Crash", 4999, new DateTime(2020, 12, 9), new DateTime(2020, 12, 10), true); _repo.AddClaim(_content); }
public void Arrange() { _ClaimQueue = new ClaimRepo(); Queue <Claim1> Claims = new Queue <Claim1> { } }
public void AddClaimAddsClaim() { Claim claim = new Claim(); ClaimRepo claimRepo = new ClaimRepo(); bool result = claimRepo.AddClaim(claim); Assert.IsTrue(result); }
public void Arrange() { _repo = new ClaimRepo(); _claim = new Claim(1, TypeOfClaim.Car, "Car accident on 465", 400.00m, "04/25/2018", "04/27/2018", true); _repo.AddAClaimToQueue(_claim); }
public void TestRemoveClaim_RemovesTheFirstClaimInList() { ClaimRepo repo = new ClaimRepo(); repo.AddClaim(ID, claimType, description, amount, incident, claim); repo.RemoveClaim(); Assert.IsFalse(repo.SeeClaims()); }
public void Test_WorkNextClaim() { var claimrepo = new ClaimRepo(); var initialclaims = _claims.Count; claimrepo.WorkNextClaim(); Assert.AreNotEqual(initialclaims, _claims.Count); }
public void NewClaimTestMethod() { //Arrenge ClaimRepo repo = new ClaimRepo(); Claim toTest = new Claim(ClaimOptions.Car, "the car hit the block", 277.67, new DateTime(2020, 3, 15), new DateTime(2020, 3, 16), true); //Act - repo.AddClaimToDirectory(toTest); }
public void ClaimsTestsArrange() { _claimQueue = new ClaimRepo(); var claim1 = new Claim(TypeOfClaim.Car, "Car accident on 465.", 400.00, new DateTime(2018, 4, 25), new DateTime(2018, 4, 27)); var claim2 = new Claim(TypeOfClaim.Home, "House fire in kitchen.", 4000.00, new DateTime(2018, 4, 11), new DateTime(2018, 4, 12)); _claimQueue.AddClaimToQueue(claim1); _claimQueue.AddClaimToQueue(claim2); }
public void CreateANewClaim() { Claim1 claims = new Claim1(); ClaimRepo repository = new ClaimRepo(); bool addResult = repository.ClaimIsValid(claims); Assert.IsTrue(addResult); }
public void AddClaimToQueue_ShouldGetCorrectBoolean() { Claims claim = new Claims(); ClaimRepo repository = new ClaimRepo(); bool addClaim = repository.AddClaimToQueue(claim); Assert.IsTrue(addClaim); }
public void AddClaim() { ClaimProp claim = new ClaimProp(); ClaimRepo repoDirectory = new ClaimRepo(); bool addResult = repoDirectory.AddClaimToDirectory(claim); Assert.IsTrue(addResult); }
public void DisplayNextWhenVoidTests() { ClaimRepo repo = new ClaimRepo(); Assert.AreEqual(0, repo._claimRepo.Count); bool result = repo.DisplayNextClaim(); Assert.IsFalse(result); }
public void AddClaim_ShouldGetNotNull() { Claim test = new Claim(); ClaimRepo testRepo = new ClaimRepo(); testRepo.AddClaim(test); Claim fromRepo = testRepo.GetQueue().Peek(); Assert.IsNotNull(fromRepo); }
public void AddItemForTest() { List <string> ingred = new List <string> { "Green", "Red", "Yellow" }; _repo = new ClaimRepo(); _content = new ClaimProp(12342, ClaimType.Car, "Missing Steering Wheel", "$400", Convert.ToDateTime("5/12/19"), Convert.ToDateTime("5/22/19")); _repo.AddClaimToDirectory(_content); }
public void HandleClaimRemovesClaimFromDB() { Claim claim = new Claim(); ClaimRepo claimRepo = new ClaimRepo(); claimRepo.AddClaim(claim); bool isHandled = claimRepo.HandleClaim(claim); Assert.IsTrue(isHandled); }
public void TestInit() { _repo = new ClaimRepo(); claimOne = new Claim(1, ClaimType.Car, "Hit a horse and exploded", 25000.11234, new DateTime(2011, 11, 21), new DateTime(2020, 3, 19)); claimTwo = new Claim(2, ClaimType.Home, "Horse exploded and blew out my windows", 350.285678, new DateTime(2011, 11, 21), new DateTime(2011, 11, 30)); claimThree = new Claim(3, ClaimType.Theft, "Someone stole my horse and car for nefarious reasons", 20000.37466, new DateTime(2011, 10, 30), new DateTime(2011, 11, 21)); _repo.CreateNewClaim(claimOne); _repo.CreateNewClaim(claimTwo); _repo.CreateNewClaim(claimThree); }
public ClaimEntity UpdateStatus(ClaimEntity claim, StatusEntity status) { claim.Status = status; claim.StatusId = status.Id; claim.StatusName = status.Name; claim.WhenLastModified = DateTime.Now; ClaimRepo.Update(claim); return(claim); }