Skip to content

Commit

Permalink
added more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mcatanzariti committed Apr 2, 2024
1 parent 3f4de27 commit 204cb61
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Dahomey.Cbor.Tests/ObjectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,21 @@ public class StringObject
[Theory]
[InlineData("A166537472696E67F6")]
[InlineData("A166537472696E67C6F6")]
public void ReadWithNullProperty(string hexBuffer)
public void ReadWithNullStringProperty(string hexBuffer)
{
StringObject obj = Helper.Read<StringObject>(hexBuffer);
Assert.NotNull(obj);
Assert.Null(obj.String);
}

[Theory]
[InlineData("A1664F626A656374F6")]
[InlineData("A1664F626A656374C6F6")]
public void ReadWithNullObjectProperty(string hexBuffer)
{
ObjectWithObject obj = Helper.Read<ObjectWithObject>(hexBuffer);
Assert.NotNull(obj);
Assert.Null(obj.Object);
}
}
}

0 comments on commit 204cb61

Please sign in to comment.