public void DefaultConstructorTest() { var asyncColl = new AsyncProducerConsumerCollection<int>(); asyncColl.Should().Not.Be.Null(); asyncColl.Count.Should().Be(0); asyncColl.Add(100); asyncColl.Count.Should().Be(1); }
public void AddTest() { var asyncColl = new AsyncProducerConsumerCollection<int>(); for(var i = 0; i < 100; i++) asyncColl.Add(i); asyncColl.Count.Should().Be(100); }
public void ConstructorTest() { var coll = new ConcurrentQueue<int>(); for(int i = 0; i < 100; i++) coll.Enqueue(i); var asyncColl = new AsyncProducerConsumerCollection<int>(coll); asyncColl.Should().Not.Be.Null(); asyncColl.Count.Should().Be(coll.Count); }
public void DefaultConstructorTest() { var asyncColl = new AsyncProducerConsumerCollection <int>(); asyncColl.Should().Not.Be.Null(); asyncColl.Count.Should().Be(0); asyncColl.Add(100); asyncColl.Count.Should().Be(1); }
public void AddTest() { var asyncColl = new AsyncProducerConsumerCollection <int>(); for (var i = 0; i < 100; i++) { asyncColl.Add(i); } asyncColl.Count.Should().Be(100); }
public void CopyToTest() { var asyncColl = new AsyncProducerConsumerCollection<int>(); for(var i = 0; i < 100; i++) asyncColl.Add(i); asyncColl.Count.Should().Be(100); var array = new int[100]; asyncColl.CopyTo(array, 0); array.Length.Should().Be(100); }
public void ConstructorTest() { var coll = new ConcurrentQueue <int>(); for (int i = 0; i < 100; i++) { coll.Enqueue(i); } var asyncColl = new AsyncProducerConsumerCollection <int>(coll); asyncColl.Should().Not.Be.Null(); asyncColl.Count.Should().Be(coll.Count); }
public void CopyToTest() { var asyncColl = new AsyncProducerConsumerCollection <int>(); for (var i = 0; i < 100; i++) { asyncColl.Add(i); } asyncColl.Count.Should().Be(100); var array = new int[100]; asyncColl.CopyTo(array, 0); array.Length.Should().Be(100); }