public async Task when_openAsync_canNot_open_connection_to_database_should_throw_exception() { //Todo: what should i do for CI server, is there any account!!! IConnectionStringBuilder connectionStringBuilder = new StubConnectionStringBuilder() .SetConnectionString("data source=.;initial catalog=master;User Id=sa;Password=123457"); var serverConnectionString = new SqlServerDbSandBoxConnection(connectionStringBuilder); Func <Task> action = async() => await serverConnectionString.OpenAsync(); action.Should().Throw <CannotConnectToDatabaseException>(); }
public async Task open_connect_with_integratedSecurityConnectionAsync() { await _sqlServerDbSandBoxConnection.OpenAsync(); }