Ejemplo n.º 1
0
		public void TestInitialize()
		{
			_context = new DbTestContext(Settings.Default.FilesConnectionString);
			_fixture = new Fixture();

			_repository = new AwbFileRepository(new SqlProcedureExecutor(Settings.Default.FilesConnectionString));
		}
Ejemplo n.º 2
0
		private static CommonFilesFacade GetFilesFacade(
			IDbConnection connection,
			string connectionString,
			string filesConnectionString)
		{
			var mainExecutor = new SqlProcedureExecutor(connectionString);
			var filesExecutor = new SqlProcedureExecutor(filesConnectionString);
			var applicationFiles = new ApplicationFileRepository(filesExecutor);
			var clientRepository = new ClientRepository(mainExecutor);
			var calculationRepository = new CalculationRepository(mainExecutor);
			var clientBalanceRepository = new ClientBalanceRepository(mainExecutor);
			var applications = new ApplicationRepository(connection);
			var excelClientCalculation = new ExcelClientCalculation(
				calculationRepository,
				clientBalanceRepository,
				clientRepository);
			var awbFiles = new AwbFileRepository(filesExecutor);
			var clientExcelHelper = new ClientExcelHelper(clientRepository, excelClientCalculation);
			var serializer = new Serializer();

			return new CommonFilesFacade(awbFiles, clientExcelHelper, serializer, applicationFiles, applications);
		}