public void Dispose_SetsFetchedAtValueToNull_IfThereWereNoCallsToComplete() { UseConnection(sql => { // Arrange var id = CreateJobQueueRecord(sql, "1", "default"); var processingJob = new SQLiteFetchedJob(sql, id, "1", "default"); // Act processingJob.Dispose(); // Assert var record = sql.Query("select * from [HangFire.JobQueue]").Single(); Assert.Null(record.FetchedAt); }); }
public void Dispose_SetsFetchedAtValueToNull_IfThereWereNoCallsToComplete() { 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.Dispose(); // Assert var record = connection.JobQueueRepository.ToList().Single(); Assert.Equal(record.FetchedAt, DateTime.MinValue); }); }