mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-25 08:24:58 +00:00
adjust tests
This commit is contained in:
@@ -103,9 +103,8 @@ public class SharpCompressStreamErrorAsyncTest
|
||||
var buffer = new byte[32];
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
await stream.ReadAsync(buffer, 0, 32).ConfigureAwait(false);
|
||||
await stream.ReadExactAsync(buffer, 0, 32).ConfigureAwait(false);
|
||||
}
|
||||
stream.Rewind();
|
||||
Assert.Throws<InvalidOperationException>(() => stream.Rewind());
|
||||
}
|
||||
|
||||
|
||||
@@ -124,16 +124,4 @@ public class SharpCompressStreamSeekTest
|
||||
Assert.Equal(3, readBuffer[0]);
|
||||
Assert.Equal(4, readBuffer[1]);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Position_SetBeforeRecordingStart_ThrowsNotSupported()
|
||||
{
|
||||
var ms = new MemoryStream(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 });
|
||||
var nonSeekableMs = new NonSeekableStreamWrapper(ms);
|
||||
var stream = SharpCompressStream.Create(nonSeekableMs, 128);
|
||||
stream.StartRecording();
|
||||
var buffer = new byte[4];
|
||||
stream.Read(buffer, 0, 4);
|
||||
Assert.Throws<NotSupportedException>(() => stream.Position = 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user