示例#1
0
        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]));
        }
示例#2
0
        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()));
        }