27 lines
680 B
C#
27 lines
680 B
C#
|
using System.IO;
|
||
|
using System.Threading.Tasks;
|
||
|
using INetMock.Client.Audit;
|
||
|
using INetMock.Client.Audit.Serialization;
|
||
|
using Xunit;
|
||
|
|
||
|
namespace INetMock.Client.IntegrationTest.Audit.Serialization;
|
||
|
|
||
|
public class GenericReaderTest
|
||
|
{
|
||
|
[Fact]
|
||
|
public async Task Test_ReadAllAsync_AuditFile()
|
||
|
{
|
||
|
await using var auditFileStream = File.OpenRead(Path.Join("testdata", "test.ima"));
|
||
|
await using IEventReader reader = new GenericReader(new ProtoReader(auditFileStream));
|
||
|
|
||
|
var count = 0;
|
||
|
await foreach (var ev in reader.ReadAllAsync())
|
||
|
{
|
||
|
Assert.NotNull(ev);
|
||
|
count++;
|
||
|
}
|
||
|
|
||
|
Assert.True(count > 0);
|
||
|
}
|
||
|
}
|