コード例 #1
0
        public void CanCreateNewUser()
        {
            var user = new User()
                .SetDataToCreate(Name, Email, this.services, UserStatusEnum.Active)
                .Save(this.repository);

            Assert.IsFalse(string.IsNullOrEmpty(user.Id));
        }
コード例 #2
0
        public void CanGetAnUser()
        {
            new User()
                .SetDataToCreate(Name, Email, this.services, UserStatusEnum.Active)
                .Save(this.repository);

            var user = new User()
                .Get(new UserFilter().SetEmail(Email), this.repository);

            Assert.IsNotNull(user);
            Assert.IsFalse(string.IsNullOrEmpty(user.Id));
        }
コード例 #3
0
        private void ProcessUser(User user)
        {
            if (user == null)
                return;

            if(user.ServicesList == null || !user.ServicesList.Any())
                return;

            foreach (var service in user.ServicesList)
                this.ProcessService(service);
        }