Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created September 5, 2017 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/094f5fc682d81d70927693b16f7fd610 to your computer and use it in GitHub Desktop.
Save justinyoo/094f5fc682d81d70927693b16f7fd610 to your computer and use it in GitHub Desktop.
Make Your Azure WebJobs Testable Again
public abstract class WebJobActivator : IWebJobActivator
{
public virtual IWebJobActivator RegisterDependencies<THandler>(THandler handler = default(THandler))
where THandler : RegistrationHandler
{
if (handler == null)
{
return this;
}
handler.IsRegistered = true;
return this;
}
public virtual T CreateInstance<T>()
{
return Activator.CreateInstance<T>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment