Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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));
            }
        }
Exemplo n.º 3
0
        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)));
        }
Exemplo n.º 10
0
        public void TiradentesDayShouldBeAlwaysApril21(int year, string expectedDate)
        {
            var holidays = NationalHolidays.From("br").OfYear(year);

            Assert.That(holidays["Tiradentes"], Is.EqualTo(DateTime.Parse(expectedDate)));
        }
Exemplo n.º 11
0
        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)));
        }
Exemplo n.º 12
0
        public void ItDateTimeIsNotHoliday()
        {
            var IsNotholiday = NationalHolidays.From("br").OfDateTimeIsNotHoliday(new System.DateTime(2020, 10, 10));

            Assert.IsTrue(IsNotholiday);
        }