public ActionResult DeleteFromDb(string deleteText = "") { int toParse = Int32.Parse(deleteText); DBAccessCars dbcars = new DBAccessCars(); dbcars.DeleteFromDB(toParse); return(RedirectToAction("Index")); }
public void DeleteFromDBTest() { //Arrange findCars.InsertToDBToDelete(); int testDeletion = findCars.FindLatestCarId(); //Act findCars.DeleteFromDB(testDeletion); //Assert Assert.AreNotEqual(testDeletion, findCars.FindLatestCarId()); }