public void Then_CreateConnection_should_accept_a_connection_string() { _configurationMock.Setup(x => x[It.IsAny <string>()]).Returns("PROD"); var dbConnection = _sut.CreateConnection(_connectionString); dbConnection.Should().NotBeNull(); _managedIdentityTokenProviderMock.Verify(x => x.GetSqlAccessTokenAsync()); }
public void Then_CreateConnection_should_accept_a_local_connection_string(string environmentName) { _configurationMock.Setup(x => x[It.IsAny <string>()]).Returns(environmentName); var dbConnection = _sut.CreateConnection(_connectionString); dbConnection.Should().NotBeNull(); _managedIdentityTokenProviderMock.Verify(x => x.GetSqlAccessTokenAsync(), Times.Never); }