public void BytesToZipTest() { var tempZip = Path.Combine(_confSection.Settings.Paths.Surveys, _surveyDir + ".zip"); using (var zipFileStream = new FileStream(_pathToZipForInstall, FileMode.Open, FileAccess.Read)) _packageManager.BytesToZip(ReadStreamToEnd(zipFileStream), tempZip); var filesInZipFromBytes = new List <string>(); using (var zip = new ZipFile(tempZip) { UseUnicodeAsNecessary = true }) filesInZipFromBytes.AddRange(zip.Select(file => file.FileName)); CollectionAssert.AreEquivalent(_filesInInstallZip, filesInZipFromBytes); }