public void TrigggeredJobComplete_SetInstructionToError_TriggerSetToErrorState() { //act JobStore.TriggeredJobComplete(_trigger1, _job, SchedulerInstruction.SetTriggerError); //assert Assert.AreEqual(TriggerState.Error, JobStore.GetTriggerState(_trigger1.Key)); MockedSignaler.Verify(x => x.SignalSchedulingChange(null)); }
public void TrigggeredJobComplete_SetInstructionToError_TriggerSetToErrorState() { //act JobStore.TriggeredJobComplete(_trigger1, _job, SchedulerInstruction.SetTriggerError); //assert Assert.AreEqual(TriggerState.Error, JobStore.GetTriggerState(_trigger1.Key).Result); MockedSignaler.Verify(x => x.SignalSchedulingChange(It.IsAny <DateTimeOffset>(), It.IsAny <CancellationToken>())); }
public void TrigggeredJobComplete_SetInstructionToDeleted_TriggerIsDeletedSuccesfully() { //act JobStore.TriggeredJobComplete(_trigger1, _job, SchedulerInstruction.DeleteTrigger); //assert Assert.IsNull(JobStore.RetrieveTrigger(_trigger1.Key)); MockedSignaler.Verify(x => x.SignalSchedulingChange(null)); }
public void TrigggeredJobComplete_SetInstructionToAllJobTriggersComplete_TriggersSetoCompleteState() { //act JobStore.TriggeredJobComplete(_trigger1, _job, SchedulerInstruction.SetAllJobTriggersComplete); //assert Assert.AreEqual(TriggerState.Complete, JobStore.GetTriggerState(_trigger1.Key)); Assert.AreEqual(TriggerState.Complete, JobStore.GetTriggerState(_trigger2.Key)); MockedSignaler.Verify(x => x.SignalSchedulingChange(null)); }
public void TrigggeredJobComplete_SetInstructionToDeleted_TriggerIsDeletedSuccesfully() { //act JobStore.TriggeredJobComplete(_trigger1, _job, SchedulerInstruction.DeleteTrigger); //assert Assert.IsNull(JobStore.RetrieveTrigger(_trigger1.Key).Result); MockedSignaler.Verify(x => x.SignalSchedulingChange(It.IsAny <DateTimeOffset>(), It.IsAny <CancellationToken>())); }
public void TrigggeredJobComplete_SetInstructionToAllJobTriggersComplete_TriggersSetoCompleteState() { //act JobStore.TriggeredJobComplete(_trigger1, _job, SchedulerInstruction.SetAllJobTriggersComplete).GetAwaiter().GetResult(); //assert Assert.AreEqual(TriggerState.Complete, JobStore.GetTriggerState(_trigger1.Key).Result); Assert.AreEqual(TriggerState.Complete, JobStore.GetTriggerState(_trigger2.Key).Result); MockedSignaler.Verify(x => x.SignalSchedulingChange(It.IsAny <DateTimeOffset>(), It.IsAny <CancellationToken>())); }