File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ Example file formats that leverage System.IO.Packaging
4444using var sourceStream = File .OpenRead (packagePath );
4545await DeterministicPackage .ConvertAsync (sourceStream , targetStream );
4646```
47- <sup ><a href =' /src/Tests/Tests.cs#L160-L165 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-ConvertAsync ' title =' Start of snippet ' >anchor</a ></sup >
47+ <sup ><a href =' /src/Tests/Tests.cs#L174-L179 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-ConvertAsync ' title =' Start of snippet ' >anchor</a ></sup >
4848<!-- endSnippet -->
4949
5050
@@ -56,7 +56,7 @@ await DeterministicPackage.ConvertAsync(sourceStream, targetStream);
5656using var sourceStream = File .OpenRead (packagePath );
5757await DeterministicPackage .ConvertAsync (sourceStream , targetStream );
5858```
59- <sup ><a href =' /src/Tests/Tests.cs#L160-L165 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-ConvertAsync ' title =' Start of snippet ' >anchor</a ></sup >
59+ <sup ><a href =' /src/Tests/Tests.cs#L174-L179 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-ConvertAsync ' title =' Start of snippet ' >anchor</a ></sup >
6060<!-- endSnippet -->
6161
6262
Original file line number Diff line number Diff line change @@ -122,6 +122,20 @@ public async Task RunBinaryAsync([Values] Extension extension)
122122 await Verify ( stream , extension : extension . ToString ( ) ) ;
123123 }
124124
125+ [ Test ]
126+ public void AllEntriesAreStored ( [ Values ] Extension extension )
127+ {
128+ var stream = Convert ( extension ) ;
129+ stream . Position = 0 ;
130+ using var archive = new ZipArchive ( stream , ZipArchiveMode . Read ) ;
131+ foreach ( var entry in archive . Entries )
132+ {
133+ // Verify compression method is Stored (0) by checking compressed == uncompressed
134+ Assert . That ( entry . CompressedLength , Is . EqualTo ( entry . Length ) ,
135+ $ "Entry '{ entry . FullName } ' is not stored (compressed={ entry . CompressedLength } , uncompressed={ entry . Length } )") ;
136+ }
137+ }
138+
125139 public enum Extension
126140 {
127141 xlsx ,
You can’t perform that action at this time.
0 commit comments