public XamlOnDiskLedgerBookRepository(
            [NotNull] IDtoMapper<LedgerBookDto, LedgerBook> mapper,
            [NotNull] BankImportUtilities importUtilities,
            [NotNull] ILedgerBookFactory ledgerBookFactory,
            [NotNull] IReaderWriterSelector readerWriterSelector)
        {
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            if (importUtilities == null)
            {
                throw new ArgumentNullException(nameof(importUtilities));
            }

            if (ledgerBookFactory == null)
            {
                throw new ArgumentNullException(nameof(ledgerBookFactory));
            }
            if (readerWriterSelector == null) throw new ArgumentNullException(nameof(readerWriterSelector));

            this.mapper = mapper;
            this.importUtilities = importUtilities;
            this.ledgerBookFactory = ledgerBookFactory;
            this.readerWriterSelector = readerWriterSelector;
        }
 /// <summary>
 ///     Initialises an instance of the <see cref="MobileDataExporter" /> class.
 /// </summary>
 public MobileDataExporter([NotNull] LedgerCalculation calculator, IReaderWriterSelector readerWriterSelector, IEnvironmentFolders environmentFolders)
 {
     if (calculator == null) throw new ArgumentNullException(nameof(calculator));
     this.calculator = calculator;
     this.readerWriterSelector = readerWriterSelector;
     this.environmentFolders = environmentFolders;
 }
示例#3
0
        public CsvOnDiskStatementModelRepositoryV1(
            [NotNull] BankImportUtilities importUtilities,
            [NotNull] ILogger logger,
            [NotNull] IDtoMapper <TransactionSetDto, StatementModel> mapper,
            [NotNull] IReaderWriterSelector readerWriterSelector)
        {
            if (importUtilities == null)
            {
                throw new ArgumentNullException(nameof(importUtilities));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }
            if (readerWriterSelector == null)
            {
                throw new ArgumentNullException(nameof(readerWriterSelector));
            }

            this.importUtilities      = importUtilities;
            this.logger               = logger;
            this.mapper               = mapper;
            this.readerWriterSelector = readerWriterSelector;
        }
示例#4
0
        public XamlOnDiskLedgerBookRepository(
            [NotNull] IDtoMapper <LedgerBookDto, LedgerBook> mapper,
            [NotNull] BankImportUtilities importUtilities,
            [NotNull] ILedgerBookFactory ledgerBookFactory,
            [NotNull] IReaderWriterSelector readerWriterSelector)
        {
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            if (importUtilities == null)
            {
                throw new ArgumentNullException(nameof(importUtilities));
            }

            if (ledgerBookFactory == null)
            {
                throw new ArgumentNullException(nameof(ledgerBookFactory));
            }
            if (readerWriterSelector == null)
            {
                throw new ArgumentNullException(nameof(readerWriterSelector));
            }

            this.mapper               = mapper;
            this.importUtilities      = importUtilities;
            this.ledgerBookFactory    = ledgerBookFactory;
            this.readerWriterSelector = readerWriterSelector;
        }
        public CsvOnDiskStatementModelRepositoryV1(
            [NotNull] BankImportUtilities importUtilities,
            [NotNull] ILogger logger,
            [NotNull] IDtoMapper<TransactionSetDto, StatementModel> mapper,
            [NotNull] IReaderWriterSelector readerWriterSelector)
        {
            if (importUtilities == null)
            {
                throw new ArgumentNullException(nameof(importUtilities));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }
            if (readerWriterSelector == null) throw new ArgumentNullException(nameof(readerWriterSelector));

            this.importUtilities = importUtilities;
            this.logger = logger;
            this.mapper = mapper;
            this.readerWriterSelector = readerWriterSelector;
        }
 public CsvOnDiskStatementModelRepositoryV1TestHarness(BankImportUtilities importUtilities, IReaderWriterSelector readerWriterSelector)
     : base(importUtilities,
         new FakeLogger(),
         new Mapper_TransactionSetDto_StatementModel(
             new FakeLogger(), 
             new Mapper_TransactionDto_Transaction(new InMemoryAccountTypeRepository(), new BucketBucketRepoAlwaysFind(), new InMemoryTransactionTypeRepository())),
         readerWriterSelector)
 {
 }
 /// <summary>
 ///     Initialises an instance of the <see cref="MobileDataExporter" /> class.
 /// </summary>
 public MobileDataExporter([NotNull] LedgerCalculation calculator, IReaderWriterSelector readerWriterSelector, IEnvironmentFolders environmentFolders)
 {
     if (calculator == null)
     {
         throw new ArgumentNullException(nameof(calculator));
     }
     this.calculator           = calculator;
     this.readerWriterSelector = readerWriterSelector;
     this.environmentFolders   = environmentFolders;
 }
示例#8
0
 public CsvOnDiskStatementModelRepositoryV1TestHarness(
     BankImportUtilities importUtilities,
     IDtoMapper <TransactionSetDto, StatementModel> mapper,
     IReaderWriterSelector readerWriterSelector)
     : base(importUtilities,
            new FakeLogger(),
            mapper,
            readerWriterSelector)
 {
 }
 public CsvOnDiskStatementModelRepositoryV1TestHarness(
     BankImportUtilities importUtilities,
     IDtoMapper<TransactionSetDto, StatementModel> mapper,
     IReaderWriterSelector readerWriterSelector)
     : base(importUtilities,
         new FakeLogger(),
         mapper,
         readerWriterSelector)
 {
 }
        public XamlOnDiskMatchingRuleRepository([NotNull] IDtoMapper<MatchingRuleDto, MatchingRule> mapper, [NotNull] ILogger logger, [NotNull] IReaderWriterSelector readerWriterSelector)
        {
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            if (logger == null) throw new ArgumentNullException(nameof(logger));
            if (readerWriterSelector == null) throw new ArgumentNullException(nameof(readerWriterSelector));

            this.mapper = mapper;
            this.logger = logger;
            this.readerWriterSelector = readerWriterSelector;
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="AnzAccountStatementImporterV1" /> class.
        /// </summary>
        /// <exception cref="System.ArgumentNullException">
        /// </exception>
        public AnzAccountStatementImporterV1([NotNull] BankImportUtilities importUtilities, [NotNull] ILogger logger, [NotNull] IReaderWriterSelector readerWriterSelector)
        {
            if (importUtilities == null)
            {
                throw new ArgumentNullException(nameof(importUtilities));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }
            if (readerWriterSelector == null) throw new ArgumentNullException(nameof(readerWriterSelector));

            this.importUtilities = importUtilities;
            this.logger = logger;
            this.readerWriterSelector = readerWriterSelector;
            this.importUtilities.ConfigureLocale(new CultureInfo("en-NZ"));
            // ANZ importers are NZ specific at this stage.
        }
示例#12
0
        public XamlOnDiskMatchingRuleRepository([NotNull] IDtoMapper <MatchingRuleDto, MatchingRule> mapper, [NotNull] ILogger logger, [NotNull] IReaderWriterSelector readerWriterSelector)
        {
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }
            if (readerWriterSelector == null)
            {
                throw new ArgumentNullException(nameof(readerWriterSelector));
            }

            this.mapper = mapper;
            this.logger = logger;
            this.readerWriterSelector = readerWriterSelector;
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="XamlOnDiskBudgetRepository" /> class.
        /// </summary>
        public XamlOnDiskBudgetRepository(
            [NotNull] IBudgetBucketRepository bucketRepository,
            [NotNull] IDtoMapper<BudgetCollectionDto, BudgetCollection> mapper,
            [NotNull] IReaderWriterSelector readerWriterSelector)
        {
            if (bucketRepository == null)
            {
                throw new ArgumentNullException(nameof(bucketRepository));
            }

            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            if (readerWriterSelector == null) throw new ArgumentNullException(nameof(readerWriterSelector));

            this.budgetBucketRepository = bucketRepository;
            this.mapper = mapper;
            this.readerWriterSelector = readerWriterSelector;
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="AnzAccountStatementImporterV1" /> class.
        /// </summary>
        /// <exception cref="System.ArgumentNullException">
        /// </exception>
        public AnzAccountStatementImporterV1([NotNull] BankImportUtilities importUtilities, [NotNull] ILogger logger, [NotNull] IReaderWriterSelector readerWriterSelector)
        {
            if (importUtilities == null)
            {
                throw new ArgumentNullException(nameof(importUtilities));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }
            if (readerWriterSelector == null)
            {
                throw new ArgumentNullException(nameof(readerWriterSelector));
            }

            this.importUtilities      = importUtilities;
            this.logger               = logger;
            this.readerWriterSelector = readerWriterSelector;
            this.importUtilities.ConfigureLocale(new CultureInfo("en-NZ"));
            // ANZ importers are NZ specific at this stage.
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="XamlOnDiskBudgetRepository" /> class.
        /// </summary>
        public XamlOnDiskBudgetRepository(
            [NotNull] IBudgetBucketRepository bucketRepository,
            [NotNull] IDtoMapper <BudgetCollectionDto, BudgetCollection> mapper,
            [NotNull] IReaderWriterSelector readerWriterSelector)
        {
            if (bucketRepository == null)
            {
                throw new ArgumentNullException(nameof(bucketRepository));
            }

            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            if (readerWriterSelector == null)
            {
                throw new ArgumentNullException(nameof(readerWriterSelector));
            }

            this.budgetBucketRepository = bucketRepository;
            this.mapper = mapper;
            this.readerWriterSelector = readerWriterSelector;
        }
 public XamlOnDiskLedgerBookRepositoryTestHarness(
     [NotNull] IDtoMapper<LedgerBookDto, LedgerBook> mapper,
     IReaderWriterSelector selector) : base(mapper, new BankImportUtilitiesTestHarness(), new LedgerBookFactory(new ReconciliationBuilder(new FakeLogger())), selector)
 {
     LoadXamlFromDiskFromEmbeddedResources = true;
 }
 public XamlOnDiskMatchingRuleRepositoryTestHarness([NotNull] IDtoMapper<MatchingRuleDto, MatchingRule> mapper, IReaderWriterSelector selector) : base(mapper, new FakeLogger(), selector)
 {
 }
 public XamlOnDiskMatchingRuleRepositoryTestHarness([NotNull] IDtoMapper <MatchingRuleDto, MatchingRule> mapper, IReaderWriterSelector selector) : base(mapper, new FakeLogger(), selector)
 {
 }
示例#19
0
 public CsvOnDiskStatementModelRepositoryV1TestHarness(BankImportUtilities importUtilities, IReaderWriterSelector readerWriterSelector)
     : base(importUtilities,
            new FakeLogger(),
            new Mapper_TransactionSetDto_StatementModel(
                new FakeLogger(),
                new Mapper_TransactionDto_Transaction(new InMemoryAccountTypeRepository(), new BucketBucketRepoAlwaysFind(), new InMemoryTransactionTypeRepository())),
            readerWriterSelector)
 {
 }
 public XamlOnDiskLedgerBookRepositoryTestHarness(
     [NotNull] IDtoMapper <LedgerBookDto, LedgerBook> mapper,
     IReaderWriterSelector selector) : base(mapper, new BankImportUtilitiesTestHarness(), new LedgerBookFactory(new ReconciliationBuilder(new FakeLogger())), selector)
 {
     LoadXamlFromDiskFromEmbeddedResources = true;
 }
示例#21
0
 public AnzVisaStatementImporterV1TestHarness([NotNull] BankImportUtilities importUtilities, IReaderWriterSelector readerWriterSelector)
     : base(importUtilities, new FakeLogger(), readerWriterSelector)
 {
 }
 public AnzAccountStatementImporterV1TestHarness([NotNull] BankImportUtilities importUtilities, IReaderWriterSelector readerWriterSelector)
     : base(importUtilities, new FakeLogger(), readerWriterSelector)
 {
 }