public LedgerTransactionServiceTests()
 {
     _mockRepo = new Mock <IRepository>();
     _mockRepo.Setup(
         x => x.GetById <LedgerTransaction>(It.IsAny <object>()))
     .Returns(this.GetTestLedgerTransaction);
     _mockRepo.Setup(
         x => x.GetById(It.IsAny <object>(), It.IsAny <Expression <Func <LedgerTransaction, object> >[]>()))
     .Returns(this.GetTestLedgerTransaction);
     _mockRepo.Setup(x => x.GetById <ChartOfAccounts>(1))
     .Returns(this.GetTestChartOfAccounts(1));
     _mockRepo.Setup(x => x.GetById <ChartOfAccounts>(2))
     .Returns(this.GetTestChartOfAccounts(2));
     _mockRepo.SetupSequence(x => x.GetById <LedgerAccount>(It.IsAny <object>()))
     .Returns(this.GetTestLedgerAccounts()[0])
     .Returns(this.GetTestLedgerAccounts()[1])
     .Returns(this.GetTestLedgerAccounts()[2])
     .Returns(this.GetTestLedgerAccounts()[3])
     .Returns(this.GetTestLedgerAccounts()[4])
     .Returns(this.GetTestLedgerAccounts()[5])
     .Returns(this.GetTestLedgerAccounts()[6])
     .Returns(this.GetTestLedgerAccounts()[7])
     .Returns(this.GetTestLedgerAccounts()[8])
     .Returns(this.GetTestLedgerAccounts()[9])
     .Returns(this.GetTestLedgerAccounts()[10])
     .Returns(this.GetTestLedgerAccounts()[11])
     .Returns(this.GetTestLedgerAccounts()[12])
     .Returns(this.GetTestLedgerAccounts()[13])
     .Returns(this.GetTestLedgerAccounts()[14])
     .Returns(this.GetTestLedgerAccounts()[15])
     .Returns(this.GetTestLedgerAccounts()[16])
     .Returns(this.GetTestLedgerAccounts()[17]);
     _ledgerTransactionService = new LedgerTransactionService(_mockRepo.Object);
 }
 public LedgerTransactionsController(ECERPDbContext dbContext,
                                     SignInManager <ApplicationUser> signInManager,
                                     UserManager <ApplicationUser> userManager,
                                     ILedgerTransactionService transactionService,
                                     IChartOfAccountsService chartOfAccountsService,
                                     ILedgerAccountService ledgerAccountService) : base(dbContext, signInManager, userManager)
 {
     _ledgerTransactionService = transactionService;
     _chartOfAccountsService   = chartOfAccountsService;
     _ledgerAccountService     = ledgerAccountService;
 }
 public LedgerTransactionController(ILedgerTransactionService transactionService)
 {
     this._transactionService = transactionService;
 }