private void AddKeyValuePairToDictionary(Guid testCaseId, string key, string value) { if (!this.testCaseDataCollectionDataMap.ContainsKey(testCaseId)) { var testCaseCollectionData = new TestCaseDataCollectionData(); testCaseCollectionData.AddOrUpdateData(key, value); this.testCaseDataCollectionDataMap[testCaseId] = testCaseCollectionData; } else { this.testCaseDataCollectionDataMap[testCaseId].AddOrUpdateData(key, value); } }
/// <summary> /// Gets the data collection data stored in the in process data collection sink /// </summary> /// <param name="testCaseId">valid test case id</param> /// <returns>test data collection dictionary </returns> public IDictionary <string, string> GetDataCollectionDataSetForTestCase(Guid testCaseId) { TestCaseDataCollectionData testCaseDataCollection = null; if (!this.testCaseDataCollectionDataMap.TryGetValue(testCaseId, out testCaseDataCollection)) { if (EqtTrace.IsWarningEnabled) { EqtTrace.Warning("No DataCollection Data set for the test case {0}", testCaseId); } return(new Dictionary <string, string>()); } else { this.testCaseDataCollectionDataMap.Remove(testCaseId); return(testCaseDataCollection.CollectionData); } }