예제 #1
0
        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);
        }
예제 #2
0
 private void InitializeRepositories(bool autoSeed)
 {
     // DBO Tables
     BankAccountRepositoryBuilder     = new BankAccountRepositoryBuilder(autoSeed);
     BankAccountTypeRepositoryBuilder = new BankAccountTypeRepositoryBuilder(autoSeed);
 }