Skip to content

Commit 3095caf

Browse files
authored
fix: warnings in xunit tests due to unused theory params (#297)
Signed-off-by: Andrei de la Cruz <[email protected]>
1 parent 90aac6a commit 3095caf

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

test/OpenFeature.Contrib.Providers.Flipt.Test/FliptToOpenFeatureConverterTest.cs

+18-16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ReSharper disable RedundantUsingDirective
2+
13
using System.Net;
24
using System.Net.Http;
35
using Flipt.Rest;
@@ -14,13 +16,13 @@ public class FliptToOpenFeatureConverterTest
1416
{
1517
// EvaluateBooleanAsync Tests
1618
[Theory]
17-
[InlineData(HttpStatusCode.NotFound, ErrorType.FlagNotFound, false)]
18-
[InlineData(HttpStatusCode.BadRequest, ErrorType.TypeMismatch, false)]
19-
[InlineData(HttpStatusCode.InternalServerError, ErrorType.ProviderNotReady, false)]
20-
[InlineData(HttpStatusCode.Forbidden, ErrorType.ProviderNotReady, false)]
21-
[InlineData(HttpStatusCode.Ambiguous, ErrorType.General, false)]
19+
[InlineData(HttpStatusCode.NotFound, false)]
20+
[InlineData(HttpStatusCode.BadRequest, false)]
21+
[InlineData(HttpStatusCode.InternalServerError, false)]
22+
[InlineData(HttpStatusCode.Forbidden, false)]
23+
[InlineData(HttpStatusCode.Ambiguous, false)]
2224
public async Task EvaluateBooleanAsync_GivenHttpRequestException_ShouldHandleHttpRequestException(
23-
HttpStatusCode thrownStatusCode, ErrorType expectedOpenFeatureErrorType, bool fallbackValue)
25+
HttpStatusCode thrownStatusCode, bool fallbackValue)
2426
{
2527
var mockFliptClientWrapper = new Mock<IFliptClientWrapper>();
2628
mockFliptClientWrapper.Setup(fcw =>
@@ -69,21 +71,21 @@ public async Task EvaluateBooleanAsync_GivenNonExistentFlag_ShouldReturnDefaultV
6971

7072
var fliptToOpenFeature = new FliptToOpenFeatureConverter(mockFliptClientWrapper.Object);
7173
var resolution = async Task<ResolutionDetails<bool>>() =>
72-
await fliptToOpenFeature.EvaluateBooleanAsync("flagKey", fallBackValue);
74+
await fliptToOpenFeature.EvaluateBooleanAsync(flagKey, fallBackValue);
7375

7476
await resolution.Should().ThrowAsync<HttpRequestException>();
7577
}
7678

7779
// EvaluateAsync Tests
7880

7981
[Theory]
80-
[InlineData(HttpStatusCode.NotFound, ErrorType.FlagNotFound, 0.0)]
81-
[InlineData(HttpStatusCode.BadRequest, ErrorType.TypeMismatch, 0.0)]
82-
[InlineData(HttpStatusCode.InternalServerError, ErrorType.ProviderNotReady, 0.0)]
83-
[InlineData(HttpStatusCode.Forbidden, ErrorType.ProviderNotReady, 0.0)]
84-
[InlineData(HttpStatusCode.Ambiguous, ErrorType.General, 0.0)]
82+
[InlineData(HttpStatusCode.NotFound, 0.0)]
83+
[InlineData(HttpStatusCode.BadRequest, 0.0)]
84+
[InlineData(HttpStatusCode.InternalServerError, 0.0)]
85+
[InlineData(HttpStatusCode.Forbidden, 0.0)]
86+
[InlineData(HttpStatusCode.Ambiguous, 0.0)]
8587
public async Task EvaluateAsync_GivenHttpRequestException_ShouldHandleHttpRequestException(
86-
HttpStatusCode thrownStatusCode, ErrorType expectedOpenFeatureErrorType, double fallbackValue)
88+
HttpStatusCode thrownStatusCode, double fallbackValue)
8789
{
8890
var mockFliptClientWrapper = new Mock<IFliptClientWrapper>();
8991
mockFliptClientWrapper.Setup(fcw =>
@@ -132,10 +134,10 @@ public async Task EvaluateAsync_GivenExistingVariantFlagAndWithAnObject_ShouldRe
132134
const string flagKey = "variant-flag";
133135
const string variantKey = "variant-A";
134136
const string valueFromSrc = """
135-
{
137+
{
136138
"name": "Mr. Robinson",
137-
"age": 12,
138-
}
139+
"age": 12,
140+
}
139141
""";
140142
var expectedValue = new Value(new Structure(new Dictionary<string, Value>
141143
{

0 commit comments

Comments
 (0)