Beispiel #1
0
        public void IsWeekend()
        {
            var date = new DateTime(2020, 12, 20);

            mDayOfWeekService
            .IsWeekend(date)
            .Should()
            .Be(true);
        }
Beispiel #2
0
        public void IsWeekend_RealLogic_Friday_False()
        {
            var service = new DayOfWeekService();
            var friday  = new DateTime(2020, 10, 02);

            var actual = service.IsWeekend(friday);

            actual.Should().Be(false);
        }
Beispiel #3
0
        public void IsWeekend_RealLogic_Saturday_True()
        {
            var service  = new DayOfWeekService();
            var saturday = new DateTime(2020, 10, 03);

            var actual = service.IsWeekend(saturday);

            actual.Should().Be(true);
        }
        public void IsWeekend_Monday_False()
        {
            const bool expected = false;
            var        service  = new DayOfWeekService();

            var monday = new DateTime(2020, 10, 02);
            var actual = service.IsWeekend(monday);

            actual.Should().Be(expected);
        }
        public void IsWeekend_Sunday_True()
        {
            var        service  = new DayOfWeekService();
            const bool expected = true;

            var sunday = new DateTime(2020, 10, 03);
            var actual = service.IsWeekend(sunday);

            actual.Should().Be(expected);
        }
Beispiel #6
0
        public void GetNotWeekend()
        {
            // Arrange
            var thisSunday = new DateTime(2020, 10, 05);

            var service = new DayOfWeekService();

            // Act
            var result = service.IsWeekend(thisSunday);

            // Assert
            result.Should().Be(false);
        }
Beispiel #7
0
        public void weekendTrue2020()
        {
            var first  = new DateTime(2020, 11, 21);
            var second = new DateTime(2020, 11, 22);

            service.IsWeekend(first).Should().Be(true);
            service.IsWeekend(second).Should().Be(true);
        }
Beispiel #8
0
        public void IsWeekendPositiveLastWeekend()
        {
            var date = new DateTime(2020, 12, 27);

            _dayOfWeekService.IsWeekend(date).Should().BeTrue();
        }
 public void testIsWeekendTrue()
 {
     _instance.IsWeekend(new DateTime(2015, 2, 1)).Should().BeTrue();
     _instance.IsWeekend(new DateTime(2010, 6, 6)).Should().BeTrue();
 }
Beispiel #10
0
 public void TestDayOfWeek(DateTime date, bool isWeekend)
 {
     //Assert.AreEqual(isWeekend, _dayOfWeekService.IsWeekend(date));
     isWeekend.Should().Be(_dayOfWeekService.IsWeekend(date));
 }