コード例 #1
0
ファイル: TestRepository.cs プロジェクト: tu226/LDAP-Library
        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
ファイル: TestUserForm.cs プロジェクト: tu226/LDAP-Library
        public TestUserForm(TestUserRepository testUserRepository)
        {
            InitializeComponent();

            _testUserRepository = testUserRepository;

            Init();
        }
コード例 #3
0
 public OneItemConfigurationForm(OneItemConfigurationState oneItemConfigurationMode,
     TestUserRepository userRepository)
 {
     InitializeComponent();
     _oneItemConfiguration = OneItemConfigurationFactory.GetOneItemConfiguration(oneItemConfigurationMode,
         userRepository);
     _oneItemConfiguration.SetConfiguraionLabel(oneItemConfigurationLabel);
     _oneItemConfiguration.SetConfiguraionTextBox(oneItemConfigurationTextBox);
 }
コード例 #4
0
 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");
     }
 }
コード例 #5
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());
                    }
                },
                { TestType.TestSearchUsersNoFilter, _testImplementation.TestSearchUserNoFilter },
                { TestType.TestSearchAllNodes, _testImplementation.TestSearchAllNodes }
            };
        }
コード例 #6
0
ファイル: TestRunner.cs プロジェクト: tu226/LDAP-Library
        public TestRunner(ILdapManager lm)
        {
            UserRepository = new TestUserRepository();

            _testRepo = new TestRepository(lm, UserRepository);
        }
コード例 #7
0
 public OneItemConfigurationPassword(TestUserRepository userRepository)
 {
     _userRepository = userRepository;
 }
コード例 #8
0
 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);
        }
コード例 #11
0
 public OneItemConfigurationDescripiton(TestUserRepository userRepository)
 {
     _userRepository = userRepository;
 }