public void PeekMessages() { AMSQueueSqlAdapter.Instance.ClearQueue(); IQueue <AMSQueueItem> queue = QueueManager.GetQueue <AMSQueueItem>("amsQueue"); queue.AddMessages(string.Empty, CreateMessage(), CreateMessage()); IEnumerable <AMSQueueItem> loaded = queue.PeekMessages(string.Empty, 10); Assert.AreEqual(2, loaded.Count()); loaded = queue.PeekMessages(string.Empty, 10); Assert.AreEqual(2, loaded.Count()); }