public async Task BeforeEachTest() { const string connectionStringEnvironmentVariable = "ASPNETCORE_FootballBanter_IntegrationTests_ConnectionString"; ConnectionString = Environment.GetEnvironmentVariable(connectionStringEnvironmentVariable, EnvironmentVariableTarget.Machine); if (ConnectionString == null) { throw new ApplicationException( $"Define connection string to integration tests database using environment variable: {connectionStringEnvironmentVariable}"); } using (var sqlConnection = new SqlConnection(ConnectionString)) { await ClearDatabase(sqlConnection); } Logger = Substitute.For <ILogger>(); EmailSender = Substitute.For <IEmailSender>(); PhrasesStartup.Initialize( ConnectionString, new ExecutionContextMock(Guid.NewGuid()), Logger, new EmailsConfiguration("*****@*****.**", "sendGridUser", "sendGridKey"), "key", null, null); PhraseModule = new PhrasesModule(); }
public PhraseController(IPhrasesModule phrasesModule) { _phrasesModule = phrasesModule; }
public MemberController(IPhrasesModule phrasesModule) { _phrasesModule = phrasesModule; }