public void ExceptionWithoutHandlerThrowsException() { var bootstrapper = new AutofacBootstrapper() .WithContainer(new ExceptionThrowingContainerConfiguration()); Assert.Throws <NotImplementedException>(() => bootstrapper.Build()); }
public void ExceptionWithHandlerPassesLoggerFactory() { var bootstrapper = new AutofacBootstrapper() .WithContainer(new ExceptionThrowingContainerConfiguration()) .WithExceptionHandler((exception, loggerFactory) => { Assert.NotNull(loggerFactory); return(true); }); bootstrapper.Build(); }