public void SetUp() {
     V1Instance v1 = Factory.GetV1Instance();
     testUserFactory = new TestUserFactory(v1);
     IUserDirectoryReader ldapReader = new DirectoryReaderStub();
     ISmtpAdapter smtpAdapter = new SmtpAdapterStub();
     manager = new Manager(v1, smtpAdapter, ldapReader);
 }
Пример #2
0
        public void SetUp()
        {
            V1Instance v1 = Factory.GetV1Instance();

            testUserFactory = new TestUserFactory(v1);
            IUserDirectoryReader ldapReader  = new DirectoryReaderStub();
            ISmtpAdapter         smtpAdapter = new SmtpAdapterStub();

            manager = new Manager(v1, smtpAdapter, ldapReader);
        }
Пример #3
0
        public void TestUseIntegratedAuth()
        {
            ConfigurationManager.AppSettings.Set("IntegratedAuth", "true");
            ConfigurationManager.AppSettings.Set("V1InstanceUsername", "");
            ConfigurationManager.AppSettings.Set("V1InstancePassword", "");

            string instanceLocation = ConfigurationManager.AppSettings.Get("V1InstanceIntegratedAuth");

            ConfigurationManager.AppSettings.Set("V1Instance", instanceLocation);

            V1Instance           v1Authorized = Factory.GetV1Instance();
            IUserDirectoryReader ldapReader   = new DirectoryReaderStub();
            ISmtpAdapter         smtpAdapter  = new SmtpAdapterStub();
            Manager authorizedManager         = new Manager(v1Authorized, smtpAdapter, ldapReader);

            Assert.IsNotNull(authorizedManager);
            IDictionary <string, User> users = authorizedManager.GetVersionOneUsers();

            Assert.Greater(users.Count, 0);
        }
        public void TestUseIntegratedAuth() {
            ConfigurationManager.AppSettings.Set("IntegratedAuth", "true");
            ConfigurationManager.AppSettings.Set("V1InstanceUsername", "");
            ConfigurationManager.AppSettings.Set("V1InstancePassword", "");

            string instanceLocation = ConfigurationManager.AppSettings.Get("V1InstanceIntegratedAuth");
            ConfigurationManager.AppSettings.Set("V1Instance", instanceLocation);

            V1Instance v1Authorized = Factory.GetV1Instance();
            IUserDirectoryReader ldapReader = new DirectoryReaderStub();
            ISmtpAdapter smtpAdapter = new SmtpAdapterStub();
            Manager authorizedManager = new Manager(v1Authorized, smtpAdapter, ldapReader);
            Assert.IsNotNull(authorizedManager);
            IDictionary<string, User> users = authorizedManager.GetVersionOneUsers();
            Assert.Greater(users.Count, 0);
        }