Fix nullability issue
This commit is contained in:
parent
48a94cb1aa
commit
19b3ae16cb
4 changed files with 9 additions and 5 deletions
|
@ -39,7 +39,9 @@ public abstract record EventBase()
|
|||
|
||||
public ushort DestinationPort { get; init; }
|
||||
|
||||
public TLSDetailsEntity TlsDetails { get; init; } = new();
|
||||
public TLSDetailsEntity? TlsDetails { get; init; }
|
||||
|
||||
public bool IsTls => TlsDetails != null;
|
||||
}
|
||||
|
||||
public record Event : EventBase
|
||||
|
|
|
@ -8,10 +8,12 @@ namespace INetMock.Client.IntegrationTest.Audit.Serialization;
|
|||
|
||||
public class GenericReaderTest
|
||||
{
|
||||
[Fact]
|
||||
public async Task Test_ReadAllAsync_AuditFile()
|
||||
[Theory]
|
||||
[InlineData("test.ima")]
|
||||
[InlineData("test2.ima")]
|
||||
public async Task Test_ReadAllAsync_AuditFile(string testFile)
|
||||
{
|
||||
await using var auditFileStream = File.OpenRead(Path.Join("testdata", "test.ima"));
|
||||
await using var auditFileStream = File.OpenRead(Path.Join("testdata", testFile));
|
||||
await using IEventReader reader = new GenericReader(new ProtoReader(auditFileStream));
|
||||
|
||||
var count = 0;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="testdata\test.ima">
|
||||
<None Update="testdata\*.ima">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
|
BIN
tests/INetMock.Client.IntegrationTest/testdata/test2.ima
vendored
Normal file
BIN
tests/INetMock.Client.IntegrationTest/testdata/test2.ima
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue