public void GetSKFileInfoListTest() { string XMLFilePath = @"G:\Working\Maintenance\SK3000\RemoteUpdatePackage\Trunk"; List <SKFileInfo> sKFileInfos = FileOperat.GetSKFileInfoList(XMLFilePath); Assert.AreEqual(sKFileInfos.Count, 1); }
public void CreaterTest() { string XMLFileName = "FileVerInfo"; //string XMLFilePath = @"G:\Working\Maintenance\SK3000\UpdatePackage\CU\RemoteUpdatePackage\BranchXY"; //string XMLFilePath = @"G:\Working\Maintenance\SK3000\UpdatePackage\CU\RemoteUpdatePackage\Trunk"; //string XMLFilePath = @"G:\Working\SK3000\Cu\InstallPackage\ReleaseFile"; //string XMLFilePath = @"G:\Working\SK3000\Cu\InstallPackage\ReleaseFile_XY"; string XMLFilePath = @"G:\Working\SK3000\Cu\InstallPackage\ReleaseFile_Shendun"; //string XMLFilePath = @"G:\Working\Maintenance\SK3000\CU\CUGenerateInstallationPackage\ReleaseFile_XY - 副本"; //string XMLFilePath = @"G:\Working\Maintenance\SK3000\CU\CUGenerateInstallationPackage\ReleaseFile_RedStar"; //string XMLFilePath = @"G:\Working\Maintenance\SK3000\CU\CUGenerateInstallationPackage\ReleaseFile"; List <SKFileInfo> sKFileInfos = FileOperat.GetSKFileInfoList(XMLFilePath); bool OK = FileOperat.CreateSKFileInfoXML(XMLFileName, XMLFilePath, sKFileInfos); Assert.AreEqual(sKFileInfos.Count, 1); }
public void GetSKFileInfoListTest1() { List <string> IgnoreFileList = new List <string>(); IgnoreFileList.Add("用户布防.wav"); string XMLFilePath = @"C:\Users\Administrator\Desktop\新建文件夹 (4)"; List <SKFileInfo> sKFileInfos = FileOperat.GetSKFileInfoList(XMLFilePath, IgnoreFileList); string XMLFileName = "FileVerInfo"; XMLFilePath = @"C:\Users\Administrator\Desktop"; bool OK = FileOperat.CreateSKFileInfoXML(XMLFileName, XMLFilePath, sKFileInfos); Assert.IsTrue(OK); //Assert.AreEqual(sKFileInfos.Count, sKFileInfos.Count); }
public void Test() { string strSrc = @"G:\Working\Currency\CommonMethod\CommonMethodTests\bin\Debug\Src"; string strAim = @"G:\Working\Currency\CommonMethod\CommonMethodTests\bin\Debug\Aim"; //获取所有文件 List <SKFileInfo> lstFileInfo = FileOperat.GetSKFileInfoList(strSrc); foreach (SKFileInfo item in lstFileInfo) { string strFilePath = strSrc + "\\" + item.path; Console.WriteLine(strFilePath); string strAimPath = strAim + "\\" + item.path; string strrr = Path.GetDirectoryName(strAimPath); if (!Directory.Exists(strrr)) { Directory.CreateDirectory(strrr); } System.IO.File.Copy(strFilePath, strAimPath, true); } CommonMethod.Common.Delay_Millisecond(15000); Assert.AreEqual(lstFileInfo.Count, 1); }