public void ItDateTimeIsChristianHoliday() { var holiday = NationalHolidays.From("br").OfDateTime(new System.DateTime(2020, 12, 25)); Assert.AreNotEqual(holiday.Value, System.DateTime.MinValue); Assert.IsFalse(string.IsNullOrEmpty(holiday.Key)); }
public void TheListMustBeAscendingOrdered() { var holidays = NationalHolidays.From("br").OfYear(2016); for (var i = 1; i < holidays.Count - 1; i++) { Assert.That(holidays.ElementAt(i).Value, Is.GreaterThan(holidays.ElementAt(i - 1).Value)); } }
public void ShouldThereBe12HolidaysListed() { var holidays = NationalHolidays.From("br").OfYear(2016); Assert.That(holidays.Count, Is.EqualTo(12)); }
public void ChristmasDayShouldBeAlwaysDecember25(int year, string expectedDate) { var holidays = NationalHolidays.From("br").OfYear(year); Assert.That(holidays["Natal"], Is.EqualTo(DateTime.Parse(expectedDate))); }
public void ProclamationOfTheRepublicDayShouldBeAlwaysNovember15(int year, string expectedDate) { var holidays = NationalHolidays.From("br").OfYear(year); Assert.That(holidays["Dia da Proclamação da República"], Is.EqualTo(DateTime.Parse(expectedDate))); }
public void AllSoulsDayShouldBeAlwaysNovember2(int year, string expectedDate) { var holidays = NationalHolidays.From("br").OfYear(year); Assert.That(holidays["Dia de Finados"], Is.EqualTo(DateTime.Parse(expectedDate))); }
public void PatronessDayShouldBeAlwaysOctober12(int year, string expectedDate) { var holidays = NationalHolidays.From("br").OfYear(year); Assert.That(holidays["Dia de Nossa Senhora Aparecida"], Is.EqualTo(DateTime.Parse(expectedDate))); }
public void IndependenceDayShouldBeAlwaysSeptember7(int year, string expectedDate) { var holidays = NationalHolidays.From("br").OfYear(year); Assert.That(holidays["Dia da Independência"], Is.EqualTo(DateTime.Parse(expectedDate))); }
public void WorkersDayShouldBeAlwaysMayFirst(int year, string expectedDate) { var holidays = NationalHolidays.From("br").OfYear(year); Assert.That(holidays["Dia do Trabalhador"], Is.EqualTo(DateTime.Parse(expectedDate))); }
public void TiradentesDayShouldBeAlwaysApril21(int year, string expectedDate) { var holidays = NationalHolidays.From("br").OfYear(year); Assert.That(holidays["Tiradentes"], Is.EqualTo(DateTime.Parse(expectedDate))); }
public void NewYearsDayShouldBeAlwaysJanuaryFirst(int year, string expectedDate) { var holidays = NationalHolidays.From("br").OfYear(year); Assert.That(holidays["Confraternização Universal"], Is.EqualTo(DateTime.Parse(expectedDate))); }
public void ItDateTimeIsNotHoliday() { var IsNotholiday = NationalHolidays.From("br").OfDateTimeIsNotHoliday(new System.DateTime(2020, 10, 10)); Assert.IsTrue(IsNotholiday); }