Пример #1
0
        public TestRepository(ILdapManager ldapManagerObj, TestUserRepository testUserRepository)
        {
            _testImplementation = new TestImplementation.TestImplementation(testUserRepository, ldapManagerObj);

            TestList = new Dictionary<TestType, TestMethod>
            {
                {TestType.TestAdminConnection, _testImplementation.TestAdminConnect},
                {TestType.TestCreateUser, _testImplementation.TestCreateUser},
                {TestType.TestDeleteUser, _testImplementation.TestDeleteUser},
                {TestType.TestInitLibrary, _testImplementation.TestCompleteInitLibrary},
                {TestType.TestInitLibraryNoAdmin, _testImplementation.TestStardardInitLibraryNoAdmin},
                {TestType.TestModifyUserDescription, _testImplementation.TestModifyUserAttribute},
                {TestType.TestSearchUsers, _testImplementation.TestSearchUser},
                {TestType.TestStandardInitLibraryNoAdmin, _testImplementation.TestStardardInitLibraryNoAdmin},
                {TestType.TestUserChangePassword, _testImplementation.TestChangeUserPassword},
                {
                    TestType.TestConnectUser, () =>
                    {
                        var testMethod = new TestMethod(_testImplementation.TestUserConnectWithoutWritePermissions);
                        if (_writePermission) testMethod = _testImplementation.TestUserConnect;
                        return testMethod();
                    }
                },
                {
                    TestType.TestSearchUserAndConnect, () =>
                    {
                        var testMethod =
                            new TestMethod(_testImplementation.TestSearchUserAndConnectWithoutWritePermissions);
                        if (_writePermission) testMethod = _testImplementation.TestSearchUserAndConnect;
                        return testMethod();
                    }
                }
            };
        }
Пример #2
0
        public TestUserForm(TestUserRepository testUserRepository)
        {
            InitializeComponent();

            _testUserRepository = testUserRepository;

            Init();
        }
 public OneItemConfigurationForm(OneItemConfigurationState oneItemConfigurationMode,
     TestUserRepository userRepository)
 {
     InitializeComponent();
     _oneItemConfiguration = OneItemConfigurationFactory.GetOneItemConfiguration(oneItemConfigurationMode,
         userRepository);
     _oneItemConfiguration.SetConfiguraionLabel(oneItemConfigurationLabel);
     _oneItemConfiguration.SetConfiguraionTextBox(oneItemConfigurationTextBox);
 }
 public static IOneItemConfiguration GetOneItemConfiguration(OneItemConfigurationState state,
     TestUserRepository testUserRepository)
 {
     switch (state)
     {
         case OneItemConfigurationState.NewDescription:
             return new OneItemConfigurationDescripiton(testUserRepository);
         case OneItemConfigurationState.NewPassword:
             return new OneItemConfigurationPassword(testUserRepository);
         case OneItemConfigurationState.UserToSearch:
             return new OneItemConfigurationSearchUsers(testUserRepository);
         default:
             throw new Exception("OneItemConfiguration Value Unespected");
     }
 }
        public TestRepository(ILdapManager ldapManagerObj, TestUserRepository testUserRepository)
        {
            _testImplementation = new TestImplementation.TestImplementation(testUserRepository, ldapManagerObj);

            TestList = new Dictionary <TestType, TestMethod>
            {
                { TestType.TestAdminConnection, _testImplementation.TestAdminConnect },
                { TestType.TestCreateUser, _testImplementation.TestCreateUser },
                { TestType.TestDeleteUser, _testImplementation.TestDeleteUser },
                { TestType.TestInitLibrary, _testImplementation.TestCompleteInitLibrary },
                { TestType.TestInitLibraryNoAdmin, _testImplementation.TestStardardInitLibraryNoAdmin },
                { TestType.TestModifyUserDescription, _testImplementation.TestModifyUserAttribute },
                { TestType.TestSearchUsers, _testImplementation.TestSearchUser },
                { TestType.TestStandardInitLibraryNoAdmin, _testImplementation.TestStardardInitLibraryNoAdmin },
                { TestType.TestUserChangePassword, _testImplementation.TestChangeUserPassword },
                {
                    TestType.TestConnectUser, () =>
                    {
                        var testMethod = new TestMethod(_testImplementation.TestUserConnectWithoutWritePermissions);
                        if (_writePermission)
                        {
                            testMethod = _testImplementation.TestUserConnect;
                        }
                        return(testMethod());
                    }
                },
                {
                    TestType.TestSearchUserAndConnect, () =>
                    {
                        var testMethod =
                            new TestMethod(_testImplementation.TestSearchUserAndConnectWithoutWritePermissions);
                        if (_writePermission)
                        {
                            testMethod = _testImplementation.TestSearchUserAndConnect;
                        }
                        return(testMethod());
                    }
                },
                { TestType.TestSearchUsersNoFilter, _testImplementation.TestSearchUserNoFilter },
                { TestType.TestSearchAllNodes, _testImplementation.TestSearchAllNodes }
            };
        }
Пример #6
0
        public TestRunner(ILdapManager lm)
        {
            UserRepository = new TestUserRepository();

            _testRepo = new TestRepository(lm, UserRepository);
        }
 public OneItemConfigurationPassword(TestUserRepository userRepository)
 {
     _userRepository = userRepository;
 }
 public OneItemConfigurationSearchUsers(TestUserRepository userRepository)
 {
     _userRepository = userRepository;
 }
Пример #9
0
 public TestImplementation(TestUserRepository userRepository, ILdapManager ldapManagerObj)
 {
     _userRepository = userRepository;
     _ldapManagerObj = ldapManagerObj;
 }
Пример #10
0
        public TestRunner(ILdapManager lm)
        {
            UserRepository = new TestUserRepository();

            _testRepo = new TestRepository(lm, UserRepository);
        }
 public OneItemConfigurationDescripiton(TestUserRepository userRepository)
 {
     _userRepository = userRepository;
 }