コード例 #1
0
        public void Requeue_SetsFetchedAtValueToNull()
        {
            UseConnection(sql =>
            {
                // Arrange
                var id            = CreateJobQueueRecord(sql, "1", "default");
                var processingJob = new SQLiteFetchedJob(sql, id, "1", "default");

                // Act
                processingJob.Requeue();

                // Assert
                var record = sql.Query("select * from [HangFire.JobQueue]").Single();
                Assert.Null(record.FetchedAt);
            });
        }
コード例 #2
0
        public void Requeue_SetsFetchedAtValueToNull()
        {
            UseConnection(connection =>
            {
                // Arrange
                var queue         = "default";
                var jobId         = 1;
                var id            = CreateJobQueueRecord(connection, jobId, queue);
                var processingJob = new SQLiteFetchedJob(connection, id, jobId, queue);

                // Act
                processingJob.Requeue();

                // Assert
                var record = connection.JobQueueRepository.ToList().Single();
                Assert.Equal(record.FetchedAt, DateTime.MinValue);
            });
        }
コード例 #3
0
        public void Requeue_SetsFetchedAtValueToNull()
        {
            UseConnection(sql =>
            {
                // Arrange
                var id = CreateJobQueueRecord(sql, "1", "default");
                var processingJob = new SQLiteFetchedJob(sql, id, "1", "default");

                // Act
                processingJob.Requeue();

                // Assert
                var record = sql.Query("select * from [HangFire.JobQueue]").Single();
                Assert.Null(record.FetchedAt);
            });
        }