Skip to content

Commit

Permalink
[NOISSUE] fixed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
BalintBende committed Jun 27, 2024
1 parent e379db6 commit 1afd949
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/tests/WorkerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,19 +331,22 @@ public async Task ToJsonV30Tests() {
public async Task ToBcfWithFileStream() {
var builder = new BcfBuilder();
const string path = "Resources/output/bcf/v2.1/BcfFileStream.bcfzip";
await using var outputStream = new FileStream(
var outputStream = new FileStream(
path,
FileMode.Create,
FileAccess.Write);

var bcf = builder.WithDefaults().Build();
_worker.ToBcf(bcf, BcfVersionEnum.Bcf21, outputStream);

// await using var inputStream = new FileStream(
// path,
// FileMode.Open,
// FileAccess.Read);
// var bcfResult = await _worker.BcfFromStream(inputStream);
// Assert.That(bcfResult.Markups.Count, Is.EqualTo(1));

await outputStream.FlushAsync();
outputStream.Close();

await using var inputStream = new FileStream(
path,
FileMode.Open,
FileAccess.Read);
var bcfResult = await _worker.BcfFromStream(inputStream);
Assert.That(bcfResult.Markups.Count, Is.EqualTo(1));
}
}

0 comments on commit 1afd949

Please sign in to comment.