public void TestConstructor6() { ArrayList <String> strings = new ArrayList <String>(); for (int i = 0; i < SIZE; ++i) { strings.Add(i.ToString()); } LinkedBlockingDeque <String> q = new LinkedBlockingDeque <String>(strings); for (int i = 0; i < SIZE; ++i) { Assert.AreEqual(strings.Get(i), q.Poll()); } }
public void TestAddAll5() { ArrayList <String> empty = new ArrayList <String>(); ArrayList <String> strings = new ArrayList <String>(SIZE); for (int i = 0; i < SIZE; ++i) { strings.Add(i.ToString()); } LinkedBlockingDeque <String> q = new LinkedBlockingDeque <String>(SIZE); Assert.IsFalse(q.AddAll(empty)); Assert.IsTrue(q.AddAll(strings)); for (int i = 0; i < SIZE; ++i) { Assert.AreEqual(strings.Get(i), q.Poll()); } }