Template
chore: deploy initial code base
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using Strata.ContinuousImprovement.Biz.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Org.BouncyCastle.Math.EC.ECCurve;
|
||||
|
||||
namespace Strata.ContinuousImprovement.Biz.Test.Unit.UtilitiesTests
|
||||
{
|
||||
[TestFixture, Category("Unit")]
|
||||
public class DateExtensionsTest
|
||||
{
|
||||
[TestCaseSource(nameof(GetStartOrEndDateOfYearPeriodCases))]
|
||||
public void TestGetStartOrEndDateOfYearPeriod(DateTime dateSource, DateTime dateExpected, int yearDiff)
|
||||
{
|
||||
var dateActual = dateSource.GetStartOrEndDateOfYearPeriod(yearDiff);
|
||||
dateActual.Should().Be(dateExpected);
|
||||
}
|
||||
|
||||
public static IEnumerable<TestCaseData> GetStartOrEndDateOfYearPeriodCases()
|
||||
{
|
||||
yield return new TestCaseData(new DateTime(2024, 2, 29), new DateTime(2023, 3, 1), -1);
|
||||
yield return new TestCaseData(new DateTime(2025, 2, 28), new DateTime(2024, 3, 1), -1);
|
||||
yield return new TestCaseData(new DateTime(2023, 3, 1), new DateTime(2024, 2, 29), 1);
|
||||
yield return new TestCaseData(new DateTime(2024, 3, 1), new DateTime(2025, 2, 28), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user