public Mock <IDemoDbUnitOfWork> CreateMock() { var unitOfWork = new Mock <IDemoDbUnitOfWork>(); // DBO Tables var bankAccountRepository = BankAccountRepositoryBuilder.CreateMock(); var bankAccountTypeRepository = BankAccountTypeRepositoryBuilder.CreateMock(); unitOfWork.SetupAllProperties(); // DBO Tables unitOfWork.SetupGet(x => x.BankAccounts).Returns(bankAccountRepository.Object); unitOfWork.SetupGet(x => x.BankAccountTypes).Returns(bankAccountTypeRepository.Object); return(unitOfWork); }
private void InitializeRepositories(bool autoSeed) { // DBO Tables BankAccountRepositoryBuilder = new BankAccountRepositoryBuilder(autoSeed); BankAccountTypeRepositoryBuilder = new BankAccountTypeRepositoryBuilder(autoSeed); }