Skip to content

Commit 9308f5b

Browse files
committed
.
1 parent 186c7df commit 9308f5b

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Example file formats that leverage System.IO.Packaging
4444
using var sourceStream = File.OpenRead(packagePath);
4545
await 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);
5656
using var sourceStream = File.OpenRead(packagePath);
5757
await 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

src/Tests/Tests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)