public void Delete_ShouldGetItem(
            int id,
            string chassis)
        {
            // Act
            var result = Controller.Delete(id) as ViewResult;

            var model = (TruckViewModel)result?.Model;

            // Assert
            Assert.AreEqual(chassis, model?.Chassis, "It should return the same Chassis");
        }
        public void Delete_ShouldThrowException(int id)
        {
            // Arrange
            TruckService = new Mock <TruckService>(new FakeUnitOfWorkWithException(), Mapper);

            Controller = new TrucksController(Logger.Object, TruckService.Object);

            // Act
            var result = Controller.Delete(id, new TruckViewModel {
                Id = id
            }) as ViewResult;

            var model = (TruckViewModel)result.Model;

            // Assert
            Assert.AreEqual(id, model.Id, "Exception was not thrown");
        }