public static new void BaseClassInitialize(TestContext testContext) { MultiDirectionTestBase <DMLibDataInfo, DMLibDataType> .BaseClassInitialize(testContext); FileSizeInKB = int.Parse(Test.Data.Get("FileSize")); DMLibTestBase.InitializeDataAdaptor(); }
public static DataAdaptor <TDataInfo> GetDestAdaptor(TDataType dataType) { string key = MultiDirectionTestBase <TDataInfo, TDataType> .GetLocationKey(dataType); if (!destAdaptors.ContainsKey(key)) { throw new KeyNotFoundException( string.Format("Can't find key of destination data adaptor. DataType:{0}.", dataType.ToString())); } return(destAdaptors[key]); }
protected static string GetRelativePath(string basePath, string fullPath) { string normalizedBasePath = MultiDirectionTestBase <TDataInfo, TDataType> .NormalizePath(basePath); string normalizedFullPath = MultiDirectionTestBase <TDataInfo, TDataType> .NormalizePath(fullPath); int index = normalizedFullPath.IndexOf(normalizedBasePath); if (index < 0) { return(null); } return(normalizedFullPath.Substring(index + normalizedBasePath.Length)); }
protected static void SetDestAdaptor(TDataType dataType, DataAdaptor <TDataInfo> adaptor) { string key = MultiDirectionTestBase <TDataInfo, TDataType> .GetLocationKey(dataType); destAdaptors[key] = adaptor; }