public void LockingCastingTest() { QueueFactory <string> .Style = QueueStyle.Locking; var lockFree = QueueFactory <string> .Cast(); Assert.IsNotNull(lockFree); Assert.IsTrue(lockFree is LockQueue <string>); lockFree.Add("Test1"); lockFree.Add("Test2"); Assert.AreEqual(2, lockFree.Count()); string s; var result = lockFree.TryTake(out s); Assert.IsTrue(result); Assert.AreEqual("Test1", s); }