示例#1
0
        public InternalUserCollection()
        {
            Users = new[]
            {
                InternalUserFactory.Create(AdminPendingId,
                                           UserFactory.Create(AdminPendingUserId, AnyString, AnyString, AnyString,
                                                              AnyString)),
                InternalUserFactory.Create(AdminApprovedId, UserFactory.Create(AdminApprovedUserId, AnyString, AnyString, AnyString,
                                                                               AnyString)),
                InternalUserFactory.Create(AdminRejectedId, UserFactory.Create(AdminRejectedUserId, AnyString, AnyString, AnyString,
                                                                               AnyString)),
                InternalUserFactory.Create(ThisUserAdminPendingId, UserFactory.Create(ThisUserAdminPendingUserId, AnyString, AnyString, AnyString,
                                                                                      AnyString)),
                InternalUserFactory.Create(ThisUserAdminApprovedId, UserFactory.Create(ThisUserAdminApprovedUserId, AnyString, AnyString, AnyString,
                                                                                       AnyString))
            };

            foreach (var user in Users)
            {
                SetEmailConfirmed(user.User, true);
            }

            SetInternalUserStatus(Users[AdminPendingIndex], InternalUserStatus.Pending);
            SetInternalUserStatus(Users[AdminApprovedIndex], InternalUserStatus.Approved);
            SetInternalUserStatus(Users[AdminRejectedIndex], InternalUserStatus.Rejected);
            SetInternalUserStatus(Users[ThisUserAdminPendingIndex], InternalUserStatus.Pending);
            SetInternalUserStatus(Users[ThisUserAdminApprovedIndex], InternalUserStatus.Approved);
        }
        private IEnumerable <InternalUser> GetUsers()
        {
            var user         = UserFactory.Create(new Guid("ac795e26-1563-4833-b8f9-0529eb9e66ae"), "Name", "Surname", "123456", "*****@*****.**");
            var internalUser = InternalUserFactory.Create(new Guid("9C67BFF3-6991-4188-9D8B-C989ADCE6E32"), user);

            ObjectInstantiator <InternalUser> .SetProperty(u => u.CompetentAuthority, UKCompetentAuthority.England, internalUser);

            var users = new[]
            {
                internalUser
            };

            return(users);
        }