Exemplo n.º 1
0
        public void DeleteEngineNotFound()
        {
            // Set up Prerequisites
            var controller = new EnginesController();

            // Act
            var actionResult = controller.DeleteEngine(5);

            // Assert
            Assert.IsInstanceOfType(actionResult, typeof(NotFoundResult));
        }
Exemplo n.º 2
0
        public void DeleteEngineOk()
        {
            // Set up Prerequisites
            var controller = new EnginesController();


            // Act
            var actionResult  = controller.DeleteEngine(4);
            var contentResult = actionResult as OkNegotiatedContentResult <Engine>;

            // Assert the result
            Assert.AreEqual(4, contentResult.Content.id);
        }