public void ShouldClear() { // Given var set = new AddressSet <int> { 0, 1, 2, 3 }; set.Should().NotBeEmpty(); // When set.Clear(); // Then set.Should().BeEmpty(); }
public void ShouldNotAddIfAlreadyExists() { // ReSharper disable once UseObjectOrCollectionInitializer var set = new AddressSet <int> { 0, 1, 2, 3 }; set.Add(0); set.Add(1); set.Add(2); set.Add(3); set.Count.Should().Be(4); set.Should().ContainInOrder(0, 1, 2, 3); }