public void Blog_Must_Validate_And_Return_Message() { // Arrange var controller = new BlogController(); var blog = new BlogDto(); // Act var result = controller.Put(blog); // Assert Assert.AreEqual(result.StatusCode, HttpStatusCode.BadRequest); }
public void Put_Valid_Blog_Test() { // Arrange var controller = new BlogController(); var blog = new BlogDto(); blog.AuthorName = "somename"; blog.Title = "SomeTitle"; // Act var result = controller.Put(blog); // Assert Assert.AreEqual(result.StatusCode, HttpStatusCode.OK); }