public void CanSetNonNullLifetimeScopeProvider() { var provider = new Mock <ILifetimeScopeProvider>(); RequestLifetimeHttpModule.SetLifetimeScopeProvider(provider.Object); Assert.Equal(provider.Object, RequestLifetimeHttpModule.LifetimeScopeProvider); }
public void CannotSetNullLifetimeScopeProvider() { var exception = Assert.Throws <ArgumentNullException>(() => RequestLifetimeHttpModule.SetLifetimeScopeProvider(null)); Assert.Equal("lifetimeScopeProvider", exception.ParamName); }