示例#1
0
 public AccountController(AccountService service)
 {
     _service = service;
 }
示例#2
0
        public void SetUp()
        {
            FakeDi.Register();

            var users = new List<User>
            {
                new User { Email = "*****@*****.**", FullName = "Saveli Bondini", FirstName = "Saveli",
                    LastName = "Bondini", BirthDate = DateTime.Now, Role = Roles.Simple, Live = LiveStatuses.Active, ApproveState = ApproveStates.NotApproved, Contacts = new List<Contact>()},

                new User { Email = "*****@*****.**", FullName = "Oleg Shepelev", FirstName = "Oleg",
                    LastName = "Shepelev", BirthDate = DateTime.Now, Role = Roles.Simple, Live = LiveStatuses.Active, ApproveState = ApproveStates.NotApproved, Contacts = new List<Contact>()}
            };

            _repoUnit = new RepoUnit();
            Ioc.RegisterInstance<RepoUnit>(_repoUnit);

            users.ForEach(_repoUnit.User.Save);

            _accountService = Ioc.Resolve<AccountService>();
        }
示例#3
0
        public void SetUp()
        {
            FakeDi.Register();

            _users = new List<User>()
            {
                new User { Email = "*****@*****.**", FirstName = "Saveli", LastName = "Bondini", Role = Roles.Simple, Live = LiveStatuses.Active },
                new User { Email = "*****@*****.**", FirstName = "Dima", LastName = "Rossi", Role = Roles.Simple, Live = LiveStatuses.Active },
                new User { Email = "*****@*****.**", FirstName = "Dima", LastName = "Prohorov", Role = Roles.Simple, Live = LiveStatuses.Active }
            };

            _repoUnit = new RepoUnit();
            Ioc.RegisterInstance<RepoUnit>(_repoUnit);

            _users.ForEach(_repoUnit.User.Save);

            _accountService = Ioc.Resolve<AccountService>();
        }