public async Task GetAdminUserByEmaildAsyncTest() { _mock.Setup(p => p.GetAdminUserByEmailAsync("*****@*****.**")).ReturnsAsync(new AdminUserDto()); var controller = new AdminUserController(_mock.Object); var actionResult = await controller.GetAdminUserByEmaildAsync("*****@*****.**"); var contentResult = actionResult as OkNegotiatedContentResult <BaseApiResponse>; Assert.IsNotNull(actionResult); Assert.IsInstanceOfType(actionResult, typeof(IHttpActionResult)); Assert.IsNotNull(contentResult); Assert.IsInstanceOfType(contentResult, typeof(OkNegotiatedContentResult <BaseApiResponse>)); Assert.IsNotNull(contentResult.Content); Assert.IsInstanceOfType(contentResult.Content.Data, typeof(AdminUserDto)); }