// Fails when run in test suite, success when run separately public void Test3_Delete() { // Arrange var controller = new BlogController(_context); // Act var invalidStatusCode = controller.Delete(100000000); var validStatusCode = controller.Delete(1); // Assert Assert.Equal(404, invalidStatusCode.StatusCode); Assert.Equal(200, validStatusCode.StatusCode); }
public async void Delete_Test() { var res = await blogController.Delete(99); Assert.False(res.success); var data = res.response; Assert.Null(data); }
public async void DeleteTest() { var res = await blogController.Delete(1); Assert.True(res.success); }