Beispiel #1
0
        private void ReplaceMappedTestCaseHandler(ALMTestStepManualMappingConfig source, ALMTestStepManualMappingConfig target)
        {
            if (target is null)
            {
                return;
            }
            ALMTSTestStep targetTemp = target.almTestStep;

            // Map test step to Map row.
            target.UpdateMappedTestStep(source.almTestStep);
            // Replace target with source.
            source.UpdateMappedTestStep(targetTemp);
        }
Beispiel #2
0
        private void UnMapTestStepHandler(ALMTestStepManualMappingConfig source)
        {
            ALMTestCaseManualMappingConfig selectedTCConfig = (xMapTestCasesGrid.Grid.SelectedItem as ALMTestCaseManualMappingConfig);

            if (source.almTestStep is null || selectedTCConfig is null)
            {
                return;
            }
            // Add test step to unmapped list
            if (mWizard.testCaseUnmappedStepsDic.ContainsKey(selectedTCConfig.aLMTSTest.TestID))
            {
                mWizard.testCaseUnmappedStepsDic[selectedTCConfig.aLMTSTest.TestID].Add(source.almTestStep);

                // Remove test step from Map row.
                source.UpdateMappedTestStep(null);
                selectedTCConfig.UpdateTestCaseMapStatus(mWizard.testCaseUnmappedStepsDic[selectedTCConfig.aLMTSTest.TestID].Count);
            }
        }
Beispiel #3
0
        // TODO add to helper functions
        private void MapTestStepHandler(ALMTSTestStep source, ALMTestStepManualMappingConfig target)
        {
            ALMTestCaseManualMappingConfig selectedTCConfig = (xMapTestCasesGrid.Grid.SelectedItem as ALMTestCaseManualMappingConfig);

            if (selectedTCConfig is null)
            {
                return;
            }
            if (mWizard.testCaseUnmappedStepsDic.ContainsKey(selectedTCConfig.aLMTSTest.TestID))
            {
                // if target already mapped, Add to unmapped list.
                if (target.almTestStep is not null)
                {
                    mWizard.testCaseUnmappedStepsDic[selectedTCConfig.aLMTSTest.TestID].Add(target.almTestStep);
                }
                // Map test step.
                target.UpdateMappedTestStep(source);
                // Remove test step from unmapped list.
                mWizard.testCaseUnmappedStepsDic[selectedTCConfig.aLMTSTest.TestID].Remove(source);
                selectedTCConfig.UpdateTestCaseMapStatus(mWizard.testCaseUnmappedStepsDic[selectedTCConfig.aLMTSTest.TestID].Count);
            }
        }