Beispiel #1
0
        public void UpdateVendor_Returns_True_When_Updated()
        {
            //-------------------------------------
            // Arrange
            //-------------------------------------

            var vendor = new Vendor {
            };

            mockService.Setup(m => m.GetVendor(
                                  It.IsAny <int>()
                                  )).Returns(vendor);


            mockService.Setup(m => m.UpdateVendor(
                                  It.IsAny <Vendor>()
                                  ));

            //-------------------------------------
            // Act
            //-------------------------------------

            ActionResult actionResult = controller.Put(vendor);

            //-------------------------------------
            // Assert
            //-------------------------------------

            Assert.NotNull(actionResult);
        }