Ejemplo n.º 1
0
 public void Initialize()
 {
     this.guidCreator = new Mock <IGuidCreator>(MockBehavior.Strict);
     this.getRecordsForTransaction = new Mock <IGetRecordsForTransactionDbStatement>(MockBehavior.Strict);
     this.persistCommittedRecords  = new Mock <IPersistCommittedRecordsDbStatement>(MockBehavior.Strict);
     this.target = new CreateTransactionRefund(
         this.guidCreator.Object,
         this.getRecordsForTransaction.Object,
         this.persistCommittedRecords.Object);
 }
        private void InitializeServices(TestDatabaseContext testDatabase)
        {
            this.updateAccountBalances = new UpdateAccountBalancesDbStatement(testDatabase);
            this.getAccountSettings    = new GetAccountSettingsDbStatement(testDatabase);
            this.getCreatorRevenue     = new GetCreatorRevenueDbStatement(testDatabase);

            this.persistCreditRefund = new PersistCreditRefund(
                new GuidCreator(),
                new PersistCommittedRecordsDbStatement(testDatabase));

            this.createTransactionRefund = new CreateTransactionRefund(
                new GuidCreator(),
                new GetRecordsForTransactionDbStatement(testDatabase),
                new PersistCommittedRecordsDbStatement(testDatabase));

            this.getCreditTransactionInformation = new GetCreditTransactionInformation(
                new GetRecordsForTransactionDbStatement(testDatabase));

            this.getCalculatedAccountBalances = new GetCalculatedAccountBalancesDbStatement(testDatabase);
        }