public async void Create()
        {
            var mock  = new ServiceMockFacade <IOtherTransportRepository>();
            var model = new ApiOtherTransportRequestModel();

            mock.RepositoryMock.Setup(x => x.Create(It.IsAny <OtherTransport>())).Returns(Task.FromResult(new OtherTransport()));
            var service = new OtherTransportService(mock.LoggerMock.Object,
                                                    mock.RepositoryMock.Object,
                                                    mock.ModelValidatorMockFactory.OtherTransportModelValidatorMock.Object,
                                                    mock.BOLMapperMockFactory.BOLOtherTransportMapperMock,
                                                    mock.DALMapperMockFactory.DALOtherTransportMapperMock);

            CreateResponse <ApiOtherTransportResponseModel> response = await service.Create(model);

            response.Should().NotBeNull();
            mock.ModelValidatorMockFactory.OtherTransportModelValidatorMock.Verify(x => x.ValidateCreateAsync(It.IsAny <ApiOtherTransportRequestModel>()));
            mock.RepositoryMock.Verify(x => x.Create(It.IsAny <OtherTransport>()));
        }
        public async void Create_NoErrorsOccurred_ShouldReturnResponse()
        {
            var mock = new ServiceMockFacade <IOtherTransportService, IOtherTransportRepository>();

            var model = new ApiOtherTransportServerRequestModel();

            mock.RepositoryMock.Setup(x => x.Create(It.IsAny <OtherTransport>())).Returns(Task.FromResult(new OtherTransport()));
            var service = new OtherTransportService(mock.LoggerMock.Object,
                                                    mock.MediatorMock.Object,
                                                    mock.RepositoryMock.Object,
                                                    mock.ModelValidatorMockFactory.OtherTransportModelValidatorMock.Object,
                                                    mock.DALMapperMockFactory.DALOtherTransportMapperMock);

            CreateResponse <ApiOtherTransportServerResponseModel> response = await service.Create(model);

            response.Should().NotBeNull();
            response.Success.Should().BeTrue();
            mock.ModelValidatorMockFactory.OtherTransportModelValidatorMock.Verify(x => x.ValidateCreateAsync(It.IsAny <ApiOtherTransportServerRequestModel>()));
            mock.RepositoryMock.Verify(x => x.Create(It.IsAny <OtherTransport>()));
            mock.MediatorMock.Verify(x => x.Publish(It.IsAny <OtherTransportCreatedNotification>(), It.IsAny <CancellationToken>()));
        }
        public async void Create_ErrorsOccurred_ShouldReturnErrorResponse()
        {
            var mock          = new ServiceMockFacade <IOtherTransportService, IOtherTransportRepository>();
            var model         = new ApiOtherTransportServerRequestModel();
            var validatorMock = new Mock <IApiOtherTransportServerRequestModelValidator>();

            validatorMock.Setup(x => x.ValidateCreateAsync(It.IsAny <ApiOtherTransportServerRequestModel>())).Returns(Task.FromResult(new FluentValidation.Results.ValidationResult(new List <ValidationFailure>()
            {
                new ValidationFailure("text", "test")
            })));
            var service = new OtherTransportService(mock.LoggerMock.Object,
                                                    mock.MediatorMock.Object,
                                                    mock.RepositoryMock.Object,
                                                    validatorMock.Object,
                                                    mock.DALMapperMockFactory.DALOtherTransportMapperMock);

            CreateResponse <ApiOtherTransportServerResponseModel> response = await service.Create(model);

            response.Should().NotBeNull();
            response.Success.Should().BeFalse();
            validatorMock.Verify(x => x.ValidateCreateAsync(It.IsAny <ApiOtherTransportServerRequestModel>()));
            mock.MediatorMock.Verify(x => x.Publish(It.IsAny <OtherTransportCreatedNotification>(), It.IsAny <CancellationToken>()), Times.Never());
        }