コード例 #1
0
        public (IAccountRepository, IBusinessContext) GetNewAccountRepository()
        {
            IRepositoryContextMock Repository = RepositoryContext();

            SeedData(Repository.Context);
            IBusinessContext   Business          = BusinessContext(Repository);
            IAccountRepository AccountRepository = new AccountRepMock(Repository);

            return(AccountRepository, Business);
        }
コード例 #2
0
        public (IAccountRepository, IAccountBusiness) GetNewAccount()
        {
            IRepositoryContextMock repository = RepositoryContext();

            SeedData(repository.Context);
            IBusinessContext     business          = BusinessContext(repository);
            IAccountRepository   AccountRepository = new AccountRepMock(repository);
            IProfileRepository   profileRep        = new ProfileRepMock(repository);
            ICreateNewOccurrence occurrence        = new OccurrenceSuccessMock();
            ISendWelcomeEmail    email             = new SendMailSuccessMock();
            IAccountBusiness     AccountBusiness   = new AccountBsMock(business, AccountRepository, profileRep, occurrence, email);

            return(AccountRepository, AccountBusiness);
        }
コード例 #3
0
 private IBusinessContext BusinessContext(IRepositoryContextMock repository = null)
 => new BusinessContextMock(repository ?? RepositoryContext());
コード例 #4
0
 public BusinessContextMock(IRepositoryContextMock application)
 {
     this.application = application;
 }
コード例 #5
0
 public ProfileRepMock(IRepositoryContextMock repository)
 {
     this.repository = repository;
 }
コード例 #6
0
 public AccountRepMock(IRepositoryContextMock repository)
 {
     this.repository = repository;
 }