public void ExistsSchoolVanFail() { SetUp(); SchoolVan newSchoolVan = new SchoolVan(); SchoolVanLogic testLogic = new SchoolVanLogic(); Assert.IsFalse(testLogic.Exists(newSchoolVan)); }
public void AddSchoolVanSuccess() { SetUp(); SchoolVan newSchoolVan = new SchoolVan(); SchoolVanLogic testLogic = new SchoolVanLogic(); testLogic.Add(newSchoolVan); Assert.IsTrue(testLogic.Exists(newSchoolVan)); }
public void DeleteSchoolVanSuccess() { SetUp(); SchoolVan newSchoolVan = new SchoolVan(); SchoolVanLogic testLogic = new SchoolVanLogic(); testLogic.Add(newSchoolVan); newSchoolVan.Id = testLogic.GetNextIdFree() - 1; testLogic.Remove(newSchoolVan); Assert.IsFalse(testLogic.Exists(newSchoolVan)); }
public void DeleteSchoolDifferentObjectFail() { SetUp(); SchoolVan newSchoolVan = new SchoolVan(); SchoolVanLogic testLogic = new SchoolVanLogic(); int testInt = 0; testLogic.Add(newSchoolVan); testLogic.Remove(testInt); Assert.IsTrue(testLogic.Exists(newSchoolVan)); }
public void AddInvalidSchoolVan() { SetUp(); SchoolVan newSchoolVan = new SchoolVan(); newSchoolVan.Capacity = -30; SchoolVanLogic testLogic = new SchoolVanLogic(); testLogic.Add(newSchoolVan); Assert.IsFalse(testLogic.Exists(newSchoolVan)); }
public void ModifySchoolVanFailCheckOldSchoolVan() { SetUp(); SchoolVanLogic testLogic = new SchoolVanLogic(); SchoolVan newSchoolVan = new SchoolVan(); SchoolVan anotherSchoolVan = new SchoolVan(); anotherSchoolVan.Id = -3; testLogic.Add(newSchoolVan); testLogic.Modify(newSchoolVan, anotherSchoolVan); Assert.IsTrue(testLogic.Exists(newSchoolVan)); }
public void ModifySchoolVanModifyNonExistent() { SetUp(); SchoolVan schoolVan = new SchoolVan(); schoolVan.Id = 4; SchoolVanLogic testLogic = new SchoolVanLogic(); SchoolVan editedSchoolVan = new SchoolVan(); editedSchoolVan.Id = 50; testLogic.Modify(schoolVan, editedSchoolVan); Assert.IsFalse(testLogic.Exists(editedSchoolVan)); }
public void ModifySchoolVanFail() { SetUp(); SchoolVan schoolVan = new SchoolVan(); SchoolVanLogic testLogic = new SchoolVanLogic(); SchoolVan editedSchoolVan = new SchoolVan(); testLogic.Add(schoolVan); schoolVan.Id = testLogic.GetNextIdFree() - 1; editedSchoolVan.Id = testLogic.GetNextIdFree() - 1; testLogic.Modify(schoolVan, editedSchoolVan); Assert.IsTrue(testLogic.Exists(editedSchoolVan)); }
public void ModifySchoolVanSuccess() { SetUp(); SchoolVan schoolVan = new SchoolVan(); schoolVan.Id = 4; SchoolVanLogic testLogic = new SchoolVanLogic(); SchoolVan editedSchoolVan = new SchoolVan(); editedSchoolVan.Id = 50; testLogic.Add(schoolVan); testLogic.Modify(schoolVan, editedSchoolVan); Assert.IsTrue(testLogic.Exists(editedSchoolVan)); }
public void DeleteSchoolVanFail() { SetUp(); SchoolVan newSchoolVan = new SchoolVan(); newSchoolVan.Id = 5; SchoolVan anotherSchoolVan = new SchoolVan(); anotherSchoolVan.Id = 6; SchoolVanLogic testLogic = new SchoolVanLogic(); testLogic.Add(newSchoolVan); newSchoolVan.Id = testLogic.GetNextIdFree() - 1; testLogic.Remove(anotherSchoolVan); Assert.IsTrue(testLogic.Exists(newSchoolVan)); }