Skip to content

Commit 0a37f6c

Browse files
author
mattosaurus
committed
Add AzureTenantId options test
1 parent 7981280 commit 0a37f6c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/Serilog.Sinks.MSSqlServer.Tests/Configuration/Implementations/Microsoft.Extensions.Configuration/MicrosoftExtensionsSinkOptionsProviderTests.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,20 @@ public void ConfigureSinkOptionsSetsAzureServiceTokenProviderResource()
150150
// Assert
151151
Assert.Equal(azureServiceTokenProviderResource, result.AzureServiceTokenProviderResource);
152152
}
153+
154+
[Fact]
155+
public void ConfigureSinkOptionsSetsAzureTenantId()
156+
{
157+
// Arrange
158+
const string azureTenantId = "00000000-0000-0000-0000-000000000000";
159+
_configurationSectionMock.Setup(s => s["azureTenantId"]).Returns(azureTenantId);
160+
var sut = new MicrosoftExtensionsSinkOptionsProvider();
161+
162+
// Act
163+
var result = sut.ConfigureSinkOptions(new MSSqlServerSinkOptions(), _configurationSectionMock.Object);
164+
165+
// Assert
166+
Assert.Equal(azureTenantId, result.AzureTenantId);
167+
}
153168
}
154169
}

0 commit comments

Comments
 (0)