public void BaseBootstrapper_WithBasicSetupOfTestAssembly_RunsWithoutFailing() { var containerMock = new Mock<IIocContainer>(); var baseBootstrapper = new BaseBootstrapper( containerMock.Object, GetType().Assembly); }
public void BaseBootstrapper_TestAssembly_RunsWithRegisteringMigrationService() { var containerMock = new Mock<IIocContainer>(); var baseBootstrapper = new BaseBootstrapper( containerMock.Object, GetType().Assembly); containerMock.Verify( x => x.RegisterType(typeof(MigrationService), typeof(IMigrationService)), Times.Once()); }
public void BaseBootstrapper_TestAssembly_LoggerRegisteredOnce() { var containerMock = new Mock<IIocContainer>(); var baseBootstrapper = new BaseBootstrapper( containerMock.Object, GetType().Assembly); containerMock.Verify( x => x.RegisterType(typeof(Logger), typeof(ILogger)), Times.Once()); }
public void ConfigureServices(IServiceCollection services) { var mapperConfiguration = new MapperConfiguration(cfg => { BaseBootstrapper bootstrapper = new BaseBootstrapper(services, cfg); }); IMapper mapper = mapperConfiguration.CreateMapper(); services.AddSingleton(mapper); services.AddSingleton(appSettings); services.AddSingleton <IAppSettings>(appSettings); services.AddSingleton <IHttpContextAccessor, HttpContextAccessor>(); services.AddControllers(); }