Example #1
0
 public JournalEntriesController(IJournalEntryGroupRepository journalEntryGroupRepository,
                                 IAccountRepository accountRepository)
 {
     _journalEntryGroupRepository =
         journalEntryGroupRepository ?? throw new ArgumentNullException(nameof(journalEntryGroupRepository));
     _accountRepository = accountRepository ?? throw new ArgumentNullException(nameof(accountRepository));
 }
        public void Setup()
        {
            _accountRepository = Substitute.For <IAccountRepository>();
            _accountRepository.Accounts.Returns(new List <Account>
            {
                new Account {
                    Code = "101.1"
                },
                new Account {
                    Code = "300"
                },
                new Account {
                    Code = "100"
                }
            }.AsQueryable());

            _journalRepository = Substitute.For <IJournalEntryGroupRepository>();
        }
Example #3
0
 public AccountController(IAccountRepository repository, IJournalEntryGroupRepository journalRepository)
 {
     _repository        = repository ?? throw new ArgumentNullException(nameof(repository));
     _journalRepository = journalRepository ?? throw new ArgumentNullException(nameof(journalRepository));
 }