public void _SetUp() { AssertionOptions.AssertEquivalencyUsing(options => options.Using <DateTime>(durr => durr.Subject.Should().BeCloseTo(durr.Expectation)).WhenTypeIs <DateTime>() ); var ctx = TestProvider.GetSqlContext(); this.Repositories = TestProvider.GetRepositoryHub(ctx); var serviceHub = TestProvider.GetServiceHub(this.Repositories); this.GroupService = serviceHub.GroupService; this.Creator = this.Repositories.UserRepository.GetById( this.Repositories.UserRepository.Create(TestProvider.GetNewUser())); }
public static ServiceHub GetServiceHub(RepositoryHub repoHub) { ILoginService loginService = null; IEnvironmentService environmentService = new EnvironmentService(repoHub, new CultureNinja()); IGroupService groupService = new GroupService(repoHub); IUserService userService = new UserService(repoHub, groupService); ICategoryService categoryService = new CategoryService(repoHub, groupService); IBankAccountService bankAccountservice = new BankAccountService(repoHub, groupService); ITransactionService transactionService = new TransactionService(repoHub); ICurrencyService currencyService = new CurrencyService(repoHub); return(new ServiceHub( loginService: loginService, /* until we figure out how to get the crap owin context thingy working in nunit */ environmentService: environmentService, userService: userService, groupService: groupService, categoryService: categoryService, bankAccountService: bankAccountservice, transactionService: transactionService, currencyService: currencyService)); }
public void _SetUp() { var ctx = TestProvider.GetSqlContext(); this.Repositories = TestProvider.GetRepositoryHub(ctx); }
public BankAccountService(RepositoryHub repoHub, IGroupService groupService) : base(repoHub) { this.GroupService = groupService; }
public CategoryService(RepositoryHub repoHub, IGroupService groupService) : base(repoHub) { this.GroupService = groupService; }
public TransactionService(RepositoryHub repoHub) : base(repoHub) { }
public CurrencyService(RepositoryHub repoHub) : base(repoHub) { }
public EnvironmentService(RepositoryHub repoHub, CultureNinja cultureNinja) : base(repoHub) { this.CultureNinja = cultureNinja; }
public BaseService(RepositoryHub repoHub) { this.Repositories = repoHub; }
public GroupService(RepositoryHub repoHub) : base(repoHub) { }