public void AddMiddlewareGeneric_ArgumentInvalidType() => RunTestException <ArgumentException>( _ => TaskHubWorkerBuilderActivityExtensions.UseActivityMiddleware <AbstractMiddleware>( Mock.Of <ITaskHubWorkerBuilder>()));
public void AddMiddlewareGeneric_ArgumentNullBuilder() => RunTestException <ArgumentNullException>( _ => TaskHubWorkerBuilderActivityExtensions.UseActivityMiddleware <TestMiddleware>(null));
public void AddMiddlewareType_ArgumentInvalidType(Type type) => RunTestException <ArgumentException>( _ => TaskHubWorkerBuilderActivityExtensions.UseActivityMiddleware( Mock.Of <ITaskHubWorkerBuilder>(), type));
public void AddMiddlewareType_ArgumentNullType() => RunTestException <ArgumentNullException>( _ => TaskHubWorkerBuilderActivityExtensions.UseActivityMiddleware( Mock.Of <ITaskHubWorkerBuilder>(), (Type)null));
public void AddMiddlewareDescriptor_ArgumentNullDescriptor() => RunTestException <ArgumentNullException>( _ => TaskHubWorkerBuilderActivityExtensions.UseActivityMiddleware( Mock.Of <ITaskHubWorkerBuilder>(), (TaskMiddlewareDescriptor)null));
public void AddMiddlewareType_ArgumentNullBuilder() => RunTestException <ArgumentNullException>( _ => TaskHubWorkerBuilderActivityExtensions.UseActivityMiddleware( null, typeof(TestMiddleware)));