public static new void BaseClassInitialize(TestContext testContext)
        {
            MultiDirectionTestBase <DMLibDataInfo, DMLibDataType> .BaseClassInitialize(testContext);

            FileSizeInKB = int.Parse(Test.Data.Get("FileSize"));
            DMLibTestBase.InitializeDataAdaptor();
        }
Esempio n. 2
0
        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]);
        }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
        protected static void SetDestAdaptor(TDataType dataType, DataAdaptor <TDataInfo> adaptor)
        {
            string key = MultiDirectionTestBase <TDataInfo, TDataType> .GetLocationKey(dataType);

            destAdaptors[key] = adaptor;
        }