Ejemplo n.º 1
0
        public ActionResult DeleteFromDb(string deleteText = "")
        {
            int toParse = Int32.Parse(deleteText);
            DBAccessVehicles dbvehicles = new DBAccessVehicles();

            dbvehicles.DeleteFromDB(toParse);

            return(RedirectToAction("Index"));
        }
        public void DeleteFromDBTest()
        {
            //Arrange
            findVehicles.InsertToDBToDelete();
            int testDeletion = findVehicles.FindLatestVehicleId();

            //Act
            findVehicles.DeleteFromDB(testDeletion);

            //Assert
            Assert.AreNotEqual(testDeletion, findVehicles.FindLatestVehicleId());
        }