Exemplo n.º 1
0
        public ITestConfigManager GetConfigManagerByTestConfig(TestConfig TestConfig)
        {
            if (_dicConfigManagerByTestConfig == null)
            {
                _dicConfigManagerByTestConfig = new Dictionary <TestConfig, ITestConfigManager>();
            }

            if (_dicConfigManagerByTestConfig.ContainsKey(TestConfig))
            {
                return(_dicConfigManagerByTestConfig[TestConfig]);
            }

            ITestConfigManager configRunner = null;

            if (TestConfig.ConcurrentUnit.ConcurentUnitType() == ConcurentUnitType.ClassLevel)
            {
                configRunner = new TestConfigManagerWithTestClassAsConcurentUnit(TestConfig, this);
            }
            else if (TestConfig.ConcurrentUnit.ConcurentUnitType() == ConcurentUnitType.TestCaseLevel)
            {
                configRunner = new TestConfigManagerWithTestCaseAsConcurentUnit(TestConfig, this);
            }

            _dicConfigManagerByTestConfig.Add(TestConfig, configRunner);
            return(configRunner);
        }
Exemplo n.º 2
0
 public void EnqueueTestCaseExecutor(ITestConfigManager testConfigManager, Action testCaseExecutor)
 {
     _dicITestConfigManagerByActions.Add(testCaseExecutor, testConfigManager);
     this.ActionQueue.Enqueue(testCaseExecutor);
 }