Exemplo n.º 1
0
        public void GetEnumerator_Empty_Empty()
        {
            // Arrange
            var set = new IsoDayOfWeekSet();

            // Act
            var list = set.ToList();

            // Assert
            list.Should().BeEmpty();
        }
Exemplo n.º 2
0
        public void GetEnumerator_AllDays()
        {
            // Arrange
            var allDays = IsoDayOfWeekSet.WithAllDays;
            var set     = new IsoDayOfWeekSet(allDays);

            // Act
            var list = set.ToList();

            // Assert
            list.Should().BeEquivalentTo(allDays);
        }
Exemplo n.º 3
0
        public void GetEnumerator_SomeDay()
        {
            // Arrange
            var days     = Fixture.CreateMany <IsoDayOfWeek>().ToList();
            var set      = new IsoDayOfWeekSet(days);
            var expected = days.Distinct().ToList();

            // Act
            var list = set.ToList();

            // Assert
            list.Should().BeEquivalentTo(expected);
        }
Exemplo n.º 4
0
        public void GetEnumerator_SingleDay_SingleDay()
        {
            // Arrange
            var day = Fixture.Create <IsoDayOfWeek>();
            var set = new IsoDayOfWeekSet {
                day
            };
            var expected = new[] { day };

            // Act
            var list = set.ToList();

            // Assert
            list.Should().BeEquivalentTo(expected);
        }