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)); }
public void EmptySnocTest() { AssertThrows <NullReferenceException>(() => BatchedQueue <string> .Snoc(null, "Item")); }