Ejemplo n.º 1
0
		public void SetUp() {

			var hashedPass = LoginManager.GetHashedPass("already_exists", "123", 0);
			userWithEmail = new User("already_exists", hashedPass, "*****@*****.**", 0) { Id = 123 };
			userWithoutEmail = new User("no_email", "222", string.Empty, 321) { Id = 321 };
			repository = new FakeUserRepository(userWithEmail, userWithoutEmail);
			repository.Add(userWithEmail.Options);
			permissionContext = new FakePermissionContext(new UserWithPermissionsContract(userWithEmail, ContentLanguagePreference.Default));
			stopForumSpamClient = new FakeStopForumSpamClient();
			mailer = new FakeUserMessageMailer();
			data = new UserQueries(repository, permissionContext, new FakeEntryLinkFactory(), stopForumSpamClient, mailer, new FakeUserIconFactory(), new FakeObjectCache());
			softBannedIPs = new HostCollection();

			request = new PasswordResetRequest(userWithEmail) { Id = Guid.NewGuid() };
			repository.Add(request);

		}
Ejemplo n.º 2
0
 public IPRuleManager(IEnumerable <string> ips)
 {
     PermBannedIPs = new HostCollection(ips);
 }