public void Delete_ThrowsAnException_WhenClientIsNull() { var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Delete(null, JobId)); Assert.Equal("client", exception.ParamName); }
public void ChangeState_WithoutFromState_ThrowsAnException_WhenClientIsNull() { var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.ChangeState(null, "job-id", _state.Object)); Assert.Equal("client", exception.ParamName); }
public void Requeue_ThrowsAnException_WhenClientIsNull() { var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Requeue(null, JobId, FailedState.StateName)); Assert.Equal("client", exception.ParamName); }
public void StaticSchedule_WithDateTimeOffset_ThrowsAnException_WhenClientIsNull() { var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Schedule( null, () => StaticMethod(), DateTimeOffset.UtcNow)); Assert.Equal("client", exception.ParamName); }
public void StaticEnqueue_WithQueue_ThrowsAnException_WhenClientIsNull() { var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Enqueue( null, () => StaticMethod(), "critical")); Assert.Equal("client", exception.ParamName); }
public void InstanceSchedule_ThrowsAnException_WhenClientIsNull() { var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Schedule <BackgroundJobClientExtensionsFacts>( null, x => x.InstanceMethod(), TimeSpan.FromDays(1))); Assert.Equal("client", exception.ParamName); }
public void InstanceEnqueue_ThrowsAnException_WhenClientIsNull() { var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Enqueue <BackgroundJobClientExtensionsFacts>( null, x => x.InstanceMethod())); Assert.Equal("client", exception.ParamName); }
public void StaticCreate_ThrowsAnException_WhenClientIsNull() { var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Create( null, () => StaticMethod(), _state.Object)); Assert.Equal("client", exception.ParamName); }
public void InstanceSchedule_WithDateTimeOffset_ThrowsAnException_WhenClientIsNull() { var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Schedule <BackgroundJobClientExtensionsFacts>( null, x => x.InstanceMethod(), DateTimeOffset.UtcNow)); Assert.Equal("client", exception.ParamName); }
public void StaticSchedule_ThrowsAnException_WhenClientIsNull() { var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Schedule( null, () => StaticMethod(), TimeSpan.FromDays(1))); Assert.Equal("client", exception.ParamName); }
public void GenericCreateShouldThrowException_ForInstanceMethodCall_FromFuncTaskTypedExpression_WhenClientIsNull() { Expression <Func <TestClass, Task> > methodCall = x => x.TestInstanceTaskMethod(); var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Create( null, methodCall, _state.Object)); Assert.Equal("client", exception.ParamName); }
public void GenericContinueWithShouldThrowException_ForInstanceMethodCall_FromActionTypedExpression_WhenClientIsNull() { Expression <Action <TestClass> > methodCall = x => x.TestInstanceMethod(); var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.ContinueWith( null, ParentJobId, methodCall)); Assert.Equal("client", exception.ParamName); }
public void ContinueWithShouldThrowException_ForStaticMethodCall_FromFuncTaskTypedExpression_WhenClientIsNull() { Expression <Func <Task> > methodCall = () => TestClass.TestStaticTaskMethod(); var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.ContinueWith( null, ParentJobId, methodCall)); Assert.Equal("client", exception.ParamName); }
public void ContinueWithShouldThrowException_WithJobContinuationOptions_ForStaticMethodCall_FromActionTypedExpression_WhenClientIsNull() { Expression <Action> methodCall = () => TestClass.TestStaticMethod(); var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.ContinueWith( null, ParentJobId, methodCall, JobContinuationOptions.OnAnyFinishedState)); Assert.Equal("client", exception.ParamName); }
public void CreateShouldThrowException_ForStaticMethodCall_FromActionTypedExpression_WhenClientIsNull() { Expression <Action> methodCall = () => TestClass.TestStaticMethod(); var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Create( null, methodCall, _state.Object)); Assert.Equal("client", exception.ParamName); }
public void GenericScheduleShouldThrowException_WithSetRunTime_ForInstanceMethodCall_FromFuncTaskTypedExpression_WhenClientIsNull() { var runAt = DateTime.UtcNow.AddHours(1); Expression <Func <TestClass, Task> > methodCall = x => x.TestInstanceTaskMethod(); var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Schedule <TestClass>( null, methodCall, runAt)); Assert.Equal("client", exception.ParamName); }
public void ScheduleShouldThrowException_WithSetRunTime_ForStaticMethodCall_FromActionTypedExpression_WhenClientIsNull() { var runAt = DateTime.UtcNow.AddHours(1); Expression <Action> methodCall = () => TestClass.TestStaticMethod(); var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Schedule( null, methodCall, runAt)); Assert.Equal("client", exception.ParamName); }
public void GenericScheduleShouldThrowException_WithDelay_ForInstanceMethodCall_FromActionTypedExpression_WhenClientIsNull() { var runAt = DateTime.UtcNow.AddHours(1); var delay = runAt.Subtract(DateTime.UtcNow); Expression <Action <TestClass> > methodCall = x => x.TestInstanceMethod(); var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Schedule <TestClass>( null, methodCall, delay)); Assert.Equal("client", exception.ParamName); }
public void ScheduleShouldThrowException_WithDelay_ForStaticMethodCall_FromFuncTaskTypedExpression_WhenClientIsNull() { var runAt = DateTime.UtcNow.AddHours(1); var delay = runAt.Subtract(DateTime.UtcNow); Expression <Func <Task> > methodCall = () => TestClass.TestStaticTaskMethod(); var exception = Assert.Throws <ArgumentNullException>( () => BackgroundJobClientExtensions.Schedule( null, methodCall, delay)); Assert.Equal("client", exception.ParamName); }