namespace Khaemhat.Fiscal.Italy.Tests; /// The late payment interest of D.Lgs. 231/2002 (issue #72): the reference rate of the half-year plus eight points. [TestClass] public sealed class LatePaymentRulesItTests { private static readonly LatePaymentRulesIt Rules = new(); [TestMethod] [DataRow(2025, 3, 10, 11.15)] [DataRow(2026, 1, 1, 10.15)] [DataRow(2026, 6, 30, 10.15)] [DataRow(2026, 7, 1, 10.40)] [DataRow(2026, 12, 31, 10.40)] public void RateOn_IsTheRateOfTheHalfYearPlusEightPoints(int year, int month, int day, double expected) => Assert.AreEqual((decimal)expected, Rules.RateOn(new DateOnly(year, month, day))); [TestMethod] public void AfterTheLastPublishedRate_TheLastRateApplies() => Assert.AreEqual(Rules.RateOn(new DateOnly(2026, 12, 31)), Rules.RateOn(new DateOnly(2030, 1, 1))); [TestMethod] public void TheCompensation_IsFortyEuros() { Assert.AreEqual(40m, Rules.RecoveryCompensation); Assert.AreEqual("D.Lgs. 231/2002", Rules.LegalReference); } }