public void CanPeekAtMultipleItemsOnQueue() { ArrayList result = Resque.Peek("people", 1, 1); Assert.That("bob", Is.EqualTo((((Dictionary <string, object>)result[0]))["name"])); result = Resque.Peek("people", 1, 2); Assert.That(((Dictionary <string, object>)result[0])["name"], Is.EqualTo("bob")); Assert.That(((Dictionary <string, object>)result[1])["name"], Is.EqualTo("mark")); result = Resque.Peek("people", 0, 2); Assert.That(((Dictionary <string, object>)result[0])["name"], Is.EqualTo("chris")); Assert.That(((Dictionary <string, object>)result[1])["name"], Is.EqualTo("bob")); result = Resque.Peek("people", 2, 1); Assert.That(((Dictionary <string, object>)result[0])["name"], Is.EqualTo("mark")); Assert.That(Resque.Peek("people", 3), Is.Null); }
public void CanPeekAtAQueue() { Assert.That("chris", Is.EqualTo(((Dictionary <string, object>)Resque.Peek("people"))["name"])); Assert.That(Resque.size("people"), Is.EqualTo(3)); }