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); }
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); } }
// 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); } }