Пример #1
0
 internal static void VerifyUserHeaderFields(MembershipUser target)
 {
     if (target.UserName.StartsWith("TEST") == true)
     {
         UserCreateStub stub = Users.Find(master => string.Compare(master.Username, target.UserName) == 0);
         if (stub == null)
         {
             Assert.Fail("Unable to find user '{0}' in list of pre configured test users", target.UserName);
         }
         stub.ValidateHeaderFields(target); //perform assertions on 'header' properties
     }
 }
Пример #2
0
 internal static MembershipUser CreateUser(UserCreateStub userCreateStub)
 {
     return(new MembershipUser("scrimpNetMembershipProvider", "username", Guid.NewGuid().ToString(), "email", "question", "comment", true, false, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now));
 }
Пример #3
0
 private static void addUserToRole(UserCreateStub user, string roleName, RoleProvider provider)
 {
     provider.AddUsersToRoles(new string[] { user.Username }, new string[] { roleName });
 }