public void KnowsWhatQuestsItIsManaging() { Assert.That(Resque.queues(), Is.EqualTo(new string[1] { "people" })); Resque.Push("cars", new Dictionary <string, string>() { { "make", "bmw" } }); Assert.That(Resque.queues(), Is.EqualTo(new string[2] { "cars", "people" })); }
public void CanDeleteAQueue() { Resque.Push("cars", new Dictionary <string, string>() { { "make", "bmw" } }); Assert.That(Resque.queues(), Is.EqualTo(new string[2] { "cars", "people" })); Resque.RemoveQueue("people"); Assert.That(Resque.queues(), Is.EqualTo(new string[1] { "cars" })); }
public Worker(string queue) { string[] queues = null; if (queue == "*") { queues = Resque.queues(); } else { queues = new string[] { queue }; } this.queues = queues; }
public void QueuesAreAlwaysAList() { Resque.redis().FlushAll(); Assert.That(Resque.queues(), Is.EqualTo(new string[0])); }