Ejemplo n.º 1
0
        public void EmptyTest()
        {
            var queue = BatchedQueue <string> .Empty;

            Assert.IsTrue(BatchedQueue <string> .IsEmpty(queue));

            queue = BatchedQueue <string> .Snoc(queue, "Item");

            Assert.IsFalse(BatchedQueue <string> .IsEmpty(queue));

            queue = BatchedQueue <string> .Tail(queue);

            Assert.IsTrue(BatchedQueue <string> .IsEmpty(queue));
        }
Ejemplo n.º 2
0
 public void EmptySnocTest()
 {
     AssertThrows <NullReferenceException>(() => BatchedQueue <string> .Snoc(null, "Item"));
 }