예제 #1
0
        public void Contains_InvalidDay_False(IsoDayOfWeek day)
        {
            // Arrange
            var set = new IsoDayOfWeekSet();

            // Act
            var contains = set.Contains(day);

            // Assert
            contains.Should().BeFalse();
        }
예제 #2
0
        public void Contains_Empty_False()
        {
            // Arrange
            var set = new IsoDayOfWeekSet();
            var day = Fixture.Create <IsoDayOfWeek>();

            // Act
            var contains = set.Contains(day);

            // Assert
            contains.Should().BeFalse();
        }
예제 #3
0
        public void Count_AnyDayInAllDays_True()
        {
            // Arrange
            var days = IsoDayOfWeekSet.WithAllDays;
            var set  = new IsoDayOfWeekSet(days);
            var day  = Fixture.Create <IsoDayOfWeek>();

            // Act
            var contains = set.Contains(day);

            // Assert
            contains.Should().BeTrue();
        }
예제 #4
0
        public void Contains_ContainedDay_True()
        {
            // Arrange
            var days = Fixture.CreateMany <IsoDayOfWeek>().ToList();
            var set  = new IsoDayOfWeekSet(days);
            var day  = days.Last();

            // Act
            var contains = set.Contains(day);

            // Assert
            contains.Should().BeTrue();
        }
예제 #5
0
        public void Contains_NonContainedDay_False()
        {
            // Arrange
            var day  = Fixture.Create <IsoDayOfWeek>();
            var days = Fixture.CreateMany <IsoDayOfWeek>().Where(d => d != day).ToList();
            var set  = new IsoDayOfWeekSet(days);

            set.Should().NotContain(day);

            // Act
            var contains = set.Contains(day);

            // Assert
            contains.Should().BeFalse();
        }