fix(tests): add test to fix coverage on DateOnly.Deconstruct

This commit is contained in:
Oliver Booth 2024-02-12 02:35:17 +00:00
parent 6750f0e3db
commit f679ec294e
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
1 changed files with 12 additions and 0 deletions

View File

@ -39,6 +39,18 @@ internal class DateOnlyTests
Assert.That(age, Is.EqualTo(18));
}
[Test]
public void Deconstruct_ShouldDeconstruct_GivenDateOnly()
{
var date = new DateOnly(2017, 12, 31);
date.Deconstruct(out int year, out int month, out int day);
Assert.That(year, Is.EqualTo(2017));
Assert.That(month, Is.EqualTo(12));
Assert.That(day, Is.EqualTo(31));
}
[Test]
public void Deconstruct_ShouldDeconstructToTuple_GivenDateOnly()
{