Пример #1
0
        public void PutReturnsBadRequest()
        {
            // Arrange
            var mockRepository = new Mock <IPropertyRepository>();
            var controller     = new PropertiesController(mockRepository.Object);

            // Act
            IHttpActionResult actionResult = controller.Put(10, new Property {
                Id = 9, Place = "Place2"
            });

            // Assert
            Assert.IsInstanceOfType(actionResult, typeof(BadRequestResult));
        }