public void Get_Blogs_Test() { //Arrange var controller = new BlogController(); // Act var result = controller.Get(); // Assert // TODO consider using MOQ instead? Assert.AreEqual(result.StatusCode, HttpStatusCode.OK); }
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); }