public void GetEnumerator_Empty_Empty() { // Arrange var set = new IsoDayOfWeekSet(); // Act var list = set.ToList(); // Assert list.Should().BeEmpty(); }
public void GetEnumerator_AllDays() { // Arrange var allDays = IsoDayOfWeekSet.WithAllDays; var set = new IsoDayOfWeekSet(allDays); // Act var list = set.ToList(); // Assert list.Should().BeEquivalentTo(allDays); }
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); }
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); }