public void ShouldAddNew() { // ReSharper disable once UseObjectOrCollectionInitializer var set = new ConcurrentRoundRobinSet <int>(); set.Add(1); set.Count.Should().Be(1); set.ToList().Should().ContainInOrder(1); }
public void ShouldRemove() { var set = new ConcurrentRoundRobinSet <int> { 0, 1, 2, 3 }; set.Remove(0); set.Remove(2); set.ToList().Should().ContainInOrder(1, 3); }
public void ShouldNotMoveIfNotExists() { var set = new ConcurrentRoundRobinSet <int> { 0, 1 }; set.Remove(3); set.Count.Should().Be(2); set.ToList().Should().ContainInOrder(0, 1); }