public void ShouldHavePasswordResetEmail() { UserManagerConfig config = new UserManagerConfig(); UserManager mgr = config.Create(); Expect.IsTrue(mgr.EmailComposer.TemplateExists(UserManager.PasswordResetEmailName), "Password Reset email template was not there"); }
public void ShouldHaveConfirmationEmail() { UserManagerConfig config = new UserManagerConfig(); UserManager mgr = config.Create(); Expect.IsTrue(mgr.EmailComposer.TemplateExists(UserManager.AccountConfirmationEmailName), "Account Confirmation email template was not there"); }
public void ShouldInitializeDaoUserManagerFromConfig() { UserManagerConfig config = new UserManagerConfig(); UserManager mgr = config.Create(); Expect.IsNotNull(mgr); Expect.IsNotNull(mgr.EmailComposer); Expect.IsNotNull(mgr.SmtpSettingsVault); }
public void ShouldInitializeDaoUserManagerAppNameResolver() { UserManagerConfig config = new UserManagerConfig(); config.ApplicationNameResolverType = typeof(TestAppNameProvider).AssemblyQualifiedName; UserManager mgr = config.Create(); Expect.IsNotNull(mgr); Expect.IsNotNull(mgr.ApplicationNameProvider); Expect.IsObjectOfType <TestAppNameProvider>(mgr.ApplicationNameProvider, "Resolver was a {0}"._Format(mgr.ApplicationNameProvider.GetType().Name)); }
public void ShouldInitializeUserManagerVault() { UserManagerConfig config = new UserManagerConfig(); config.SmtpSettingsVaultPath = ".\\Test.vault.sqlite"; UserManager mgr = config.Create(); Expect.IsNotNull(mgr); Expect.IsNotNull(mgr.SmtpSettingsVault); Expect.IsNotNull(mgr.SmtpSettingsVault.ConnectionString); Expect.IsTrue(mgr.SmtpSettingsVault.ConnectionString.ToLowerInvariant().Contains("test.vault.sqlite"), "Unexpected connection string value"); }
public static UserManager CreateTestUserManager(string appName = "test") { UserManagerConfig config = new UserManagerConfig(); config.SmtpSettingsVaultPath = DataProvider.Instance.GetSysDatabasePathFor(typeof(Vault), "System"); config.ApplicationName = appName; config.EmailTemplateDirectoryPath = DataProvider.Instance.GetSysEmailTemplatesDirectory().FullName; UserManager mgr = config.Create(); return(mgr); }
public void ShouldInitializeUserManagerEmailComposer() { UserManagerConfig config = new UserManagerConfig(); config.EmailComposerType = typeof(TestEmailComposer).AssemblyQualifiedName; config.EmailTemplateDirectoryPath = _testEmailComposerTemplateDir.FullName; UserManager mgr = config.Create(); Expect.IsNotNull(mgr); Expect.IsNotNull(mgr.EmailComposer); Expect.IsObjectOfType <TestEmailComposer>(mgr.EmailComposer, "Composer was a {0}"._Format(mgr.EmailComposer.GetType().Name)); Expect.AreEqual(_testEmailComposerTemplateDir.FullName, mgr.EmailComposer.TemplateDirectory.FullName); }
public void DaoUserManagerConfigTemplateDirectoryMustNotBeNull() { UserManagerConfig config = new UserManagerConfig(); Expect.IsNotNull(config.EmailTemplateDirectoryPath); }