public void DisableUser() { // Arrange var controller = new UserManagementController(); UserManagementDTO obj = new UserManagementDTO() { UserName = "******" }; // Act IHttpActionResult actionResult = controller.DisableUser(obj); var contentResult = actionResult as OkNegotiatedContentResult <string>; // Assert Assert.NotNull(contentResult); Assert.NotNull(contentResult.Content); Assert.Equal("Success: Account was deleted for amay", contentResult.Content); }