ZipUnit is a small open-source .Net library for comparing zip files, aimed mainly at integration tests.
ZipUnit is a little .Net library for comparing zip files as part of integration tests. The code is available on GitHub.
Usage:
AssertThat.ZipFile("actual.zip").MatchesZipFile("expected.zip");
It is possible to ignore additional or missing files:
AssertThat.ZipFile("actual.zip").IgnoringAdditional(pattern1)
.IgnoringMissing(pattern2)
.MatchesZipFile("expected.zip");
where patterns look like the following:
"Dir/file.ext" //starts from the root of the zip file
"//Dir/file.ext" //starts from anywhere, like in an xPath
"Dir/*/file.ext" //Asterix (*) matches any substring (excluding the slash '/')
"Dir/file?.ext" //Question mark (?) matches one character (excluding the slash '/')