public async void BulkInsert_No_Errors() { TagsControllerMockFacade mock = new TagsControllerMockFacade(); var mockResponse = new CreateResponse <ApiTagsResponseModel>(new FluentValidation.Results.ValidationResult()); mockResponse.SetRecord(new ApiTagsResponseModel()); mock.ServiceMock.Setup(x => x.Create(It.IsAny <ApiTagsRequestModel>())).Returns(Task.FromResult <CreateResponse <ApiTagsResponseModel> >(mockResponse)); TagsController controller = new TagsController(mock.ApiSettingsMoc.Object, mock.LoggerMock.Object, mock.TransactionCoordinatorMock.Object, mock.ServiceMock.Object, mock.ModelMapperMock.Object); controller.ControllerContext = new ControllerContext(); controller.ControllerContext.HttpContext = new DefaultHttpContext(); var records = new List <ApiTagsRequestModel>(); records.Add(new ApiTagsRequestModel()); IActionResult response = await controller.BulkInsert(records); response.Should().BeOfType <OkObjectResult>(); (response as OkObjectResult).StatusCode.Should().Be((int)HttpStatusCode.OK); var result = (response as OkObjectResult).Value as List <ApiTagsResponseModel>; result.Should().NotBeEmpty(); mock.ServiceMock.Verify(x => x.Create(It.IsAny <ApiTagsRequestModel>())); }