public void CanPutJobsOnTheQueueByAskingWhichQueueTheyAreInterestedIn() { Assert.That(0, Is.EqualTo(Resque.size("tester"))); Assert.IsTrue(Resque.enqueue("resque.DummyJob", 20, "/tmp")); Assert.IsTrue(Resque.enqueue("resque.DummyJob", 20, "/tmp")); Job job = Resque.Reserve("tester"); Assert.That(20, Is.EqualTo(job.args()[0])); Assert.That("/tmp", Is.EqualTo(job.args()[1])); }
public void CanGrabJobsOffAQueue() { //Job.create("jobs", "dummy-job", 20, "/tmp"); FIXME NEED TO DEAL WITH THIS Job.create("jobs", "resque.DummyJob", 20, "/tmp"); Job job = Resque.Reserve("jobs"); Assert.AreEqual("resque.DummyJob", job.PayloadClass().FullName); var num = job.args()[0]; Assert.AreEqual(20, num); Assert.That("/tmp", Is.EqualTo(job.args()[1])); }
public override bool Equals(object other) { if (other == null) { return(false); } if (object.ReferenceEquals(this, other)) { return(true); } if (this.GetType() != other.GetType()) { return(false); } Job job = (Job)other; return(this.queue == job.queue && this.PayloadClass() == job.PayloadClass() && arrayListElementsAreEqual(args(), job.args())); }