public async void Create_Errors()
        {
            CountryRequirementControllerMockFacade mock = new CountryRequirementControllerMockFacade();

            var mockResponse = new Mock <CreateResponse <ApiCountryRequirementServerResponseModel> >(null as ApiCountryRequirementServerResponseModel);
            var mockRecord   = new ApiCountryRequirementServerResponseModel();

            mockResponse.SetupGet(x => x.Success).Returns(false);

            mock.ServiceMock.Setup(x => x.Create(It.IsAny <ApiCountryRequirementServerRequestModel>())).Returns(Task.FromResult <CreateResponse <ApiCountryRequirementServerResponseModel> >(mockResponse.Object));
            CountryRequirementController controller = new CountryRequirementController(mock.ApiSettingsMoc.Object, mock.LoggerMock.Object, mock.TransactionCoordinatorMock.Object, mock.ServiceMock.Object, mock.ModelMapperMock.Object);

            controller.ControllerContext             = new ControllerContext();
            controller.ControllerContext.HttpContext = new DefaultHttpContext();

            IActionResult response = await controller.Create(new ApiCountryRequirementServerRequestModel());

            response.Should().BeOfType <ObjectResult>();
            (response as ObjectResult).StatusCode.Should().Be((int)HttpStatusCode.UnprocessableEntity);
            mock.ServiceMock.Verify(x => x.Create(It.IsAny <ApiCountryRequirementServerRequestModel>()));
        }
        public async void Create_No_Errors()
        {
            CountryRequirementControllerMockFacade mock = new CountryRequirementControllerMockFacade();

            var mockResponse = ValidationResponseFactory <ApiCountryRequirementServerResponseModel> .CreateResponse(null as ApiCountryRequirementServerResponseModel);

            mockResponse.SetRecord(new ApiCountryRequirementServerResponseModel());
            mock.ServiceMock.Setup(x => x.Create(It.IsAny <ApiCountryRequirementServerRequestModel>())).Returns(Task.FromResult <CreateResponse <ApiCountryRequirementServerResponseModel> >(mockResponse));
            CountryRequirementController controller = new CountryRequirementController(mock.ApiSettingsMoc.Object, mock.LoggerMock.Object, mock.TransactionCoordinatorMock.Object, mock.ServiceMock.Object, mock.ModelMapperMock.Object);

            controller.ControllerContext             = new ControllerContext();
            controller.ControllerContext.HttpContext = new DefaultHttpContext();

            IActionResult response = await controller.Create(new ApiCountryRequirementServerRequestModel());

            response.Should().BeOfType <CreatedResult>();
            (response as CreatedResult).StatusCode.Should().Be((int)HttpStatusCode.Created);
            var createResponse = (response as CreatedResult).Value as CreateResponse <ApiCountryRequirementServerResponseModel>;

            createResponse.Record.Should().NotBeNull();
            mock.ServiceMock.Verify(x => x.Create(It.IsAny <ApiCountryRequirementServerRequestModel>()));
        }