public void ExtractFiles() { Directory.Delete(@"C:\Temp\Test"); var meta = new MetaDataCreation(null, null, null); //var zipFilePath = @"C:\Temp\Test\TestDataLard.zip"; //var extractedPath = @"C:\Temp\Test\extracted"; var zipFilePath = @"C:\Temp\Test\Lars\lars.zip"; var extractedPath = @"C:\Temp\Test\Lars\extracted"; meta.UnPackZipFile(zipFilePath, extractedPath, "standard.csv"); }
public void DownLoadAndExtractLars() { var meta = new MetaDataCreation(null, null, null); var filename = "lars.zip"; var storageFolder = @"C:\Temp\Test\Lars"; var zipFile = $"{storageFolder}\\{filename}"; var LarsZipFileUrl = "https://hub.imservices.org.uk/Learning%20Aims/Downloads/Documents/20160209_LARS_1516_CSV.Zip"; // Clean dir DirectoryHelper.DeleteRecursive(storageFolder); // Download and unzip meta.DownloadFile(LarsZipFileUrl, storageFolder, filename); meta.UnPackZipFile(zipFile, $"{storageFolder}\\extracted", "standard.csv"); // Assert var dir = Directory.Exists(@"C:\Temp\Test\Lars"); var file = File.Exists($@"C:\Temp\Test\Lars\extracted\standard.csv"); Assert.IsTrue(dir); Assert.IsTrue(file); }