public async Task UpdateAuthor_WhenCallingValidRequest_ShouldReturnOk() { // Arrange _authorServiceMock.Setup(a => a.UpdateAuthor(It.IsAny <Guid>(), It.IsAny <AuthorDto>())); // Act IActionResult actionResult = await _authorsApiController .UpdateAuthor(new Guid(), new AuthorDto()); NoContentResult result = actionResult as NoContentResult; // null if cast fails // Assert Assert.IsNotNull(actionResult); Assert.IsNotNull(result); }