Exemple #1
0
        public LocalEnterprisePartnershipTestFixture()
        {
            var loggerRepository    = new Logger <SqlBulkInsertRepository <LocalEnterprisePartnershipStaging> >(new NullLoggerFactory());
            var loggerCsvFileReader = new Logger <CsvFileReader <LocalEnterprisePartnershipStagingFileImportDto, LocalEnterprisePartnershipStagingDto> >(new NullLoggerFactory());

            var logger = new Logger <FileImportService <LocalEnterprisePartnershipStagingFileImportDto, LocalEnterprisePartnershipStagingDto, LocalEnterprisePartnershipStaging> >(new NullLoggerFactory());

            var testConfig = new TestConfiguration();

            MatchingDbContext = testConfig.GetDbContext();
            var matchingConfiguration = TestConfiguration.MatchingConfiguration;

            var repository            = new SqlBulkInsertRepository <LocalEnterprisePartnershipStaging>(loggerRepository, matchingConfiguration);
            var functionLogRepository = new GenericRepository <FunctionLog>(new NullLogger <GenericRepository <FunctionLog> >(), MatchingDbContext);

            var dataValidator     = new LocalEnterprisePartnershipStagingDataValidator();
            var dataParser        = new LocalEnterprisePartnershipStagingDataParser();
            var nullDataProcessor = new NullDataProcessor <LocalEnterprisePartnershipStaging>();
            var csvFileReader     = new CsvFileReader <LocalEnterprisePartnershipStagingFileImportDto, LocalEnterprisePartnershipStagingDto>(loggerCsvFileReader, dataParser, dataValidator, functionLogRepository);

            var config = new MapperConfiguration(c => c.AddMaps(typeof(LocalEnterprisePartnershipStagingMapper).Assembly));

            var mapper = new Mapper(config);

            FileImportService = new FileImportService <LocalEnterprisePartnershipStagingFileImportDto, LocalEnterprisePartnershipStagingDto, LocalEnterprisePartnershipStaging>(logger, mapper, csvFileReader, repository, nullDataProcessor);
        }
Exemple #2
0
 public LocalEnterprisePartnershipStagingFileImportFixture()
 {
     Dto       = new ValidLocalEnterprisePartnershipStagingFileImportDtoBuilder().Build();
     Validator = new LocalEnterprisePartnershipStagingDataValidator();
 }