Finishline #137
@@ -0,0 +1,12 @@
|
|||||||
|
namespace PostFundManagement.Tests;
|
||||||
|
|
||||||
|
public class DebugOnlyFactAttribute : FactAttribute
|
||||||
|
{
|
||||||
|
public DebugOnlyFactAttribute()
|
||||||
|
{
|
||||||
|
if (!Debugger.IsAttached)
|
||||||
|
{
|
||||||
|
Skip = "This test only runs when a debugger is attached.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
<Using Include="Microsoft.Extensions.Configuration" />
|
<Using Include="Microsoft.Extensions.Configuration" />
|
||||||
<Using Include="Microsoft.Extensions.DependencyInjection" />
|
<Using Include="Microsoft.Extensions.DependencyInjection" />
|
||||||
<Using Include="System.Reflection" />
|
<Using Include="System.Reflection" />
|
||||||
|
<Using Include="System.Diagnostics" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -54,9 +54,8 @@ public class SkorubaUserServiceGetUserRolesIntegrationTests
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Integration test: Verify HttpClient is properly configured with SkorubaHttpClient name.
|
/// Integration test: Verify HttpClient is properly configured with SkorubaHttpClient name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//[Fact(Skip = "Skipping integration test")]
|
[DebugOnlyFact]
|
||||||
[Fact]
|
|
||||||
public void HttpClientFactory_HasSkorubaHttpClientConfigured()
|
public void HttpClientFactory_HasSkorubaHttpClientConfigured()
|
||||||
{
|
{
|
||||||
// Act
|
// Act
|
||||||
@@ -71,8 +70,7 @@ public class SkorubaUserServiceGetUserRolesIntegrationTests
|
|||||||
/// Integration test: Verify that the service properly formats API requests.
|
/// Integration test: Verify that the service properly formats API requests.
|
||||||
/// Uses a fake/invalid user ID to test the HTTP request flow.
|
/// Uses a fake/invalid user ID to test the HTTP request flow.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//[Fact(Skip = "Skipping integration test")]
|
[DebugOnlyFact]
|
||||||
[Fact]
|
|
||||||
public async Task GetUserRolesAsync_SendsProperlyFormattedRequest()
|
public async Task GetUserRolesAsync_SendsProperlyFormattedRequest()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
@@ -91,8 +89,7 @@ public class SkorubaUserServiceGetUserRolesIntegrationTests
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Integration test: Verify cancellation token is respected.
|
/// Integration test: Verify cancellation token is respected.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//[Fact(Skip = "Skipping integration test")]
|
[DebugOnlyFact]
|
||||||
[Fact]
|
|
||||||
public async Task GetUserRolesAsync_RespectsCancellationToken()
|
public async Task GetUserRolesAsync_RespectsCancellationToken()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
|
|||||||
Reference in New Issue
Block a user