Exemplo n.º 1
0
        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()));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 4
0
 public BankAccountService(RepositoryHub repoHub, IGroupService groupService)
     : base(repoHub)
 {
     this.GroupService = groupService;
 }
Exemplo n.º 5
0
 public CategoryService(RepositoryHub repoHub, IGroupService groupService) : base(repoHub)
 {
     this.GroupService = groupService;
 }
Exemplo n.º 6
0
 public TransactionService(RepositoryHub repoHub)
     : base(repoHub)
 {
 }
Exemplo n.º 7
0
 public CurrencyService(RepositoryHub repoHub) : base(repoHub)
 {
 }
Exemplo n.º 8
0
 public EnvironmentService(RepositoryHub repoHub, CultureNinja cultureNinja)
     : base(repoHub)
 {
     this.CultureNinja = cultureNinja;
 }
Exemplo n.º 9
0
 public BaseService(RepositoryHub repoHub)
 {
     this.Repositories = repoHub;
 }
Exemplo n.º 10
0
 public GroupService(RepositoryHub repoHub)
     : base(repoHub)
 {
 }