Skip to content

Commit

Permalink
Adding more unit tests.
Browse files Browse the repository at this point in the history
Signed-off-by: André Silva <[email protected]>
  • Loading branch information
askpt committed Mar 28, 2024
1 parent 3530680 commit fba7e84
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/OpenFeature.Tests/FeatureProviderExceptionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,18 @@ public void GetDescription_WhenCalledWithEnumWithoutDescription_ReturnsEnumName(
// Assert
Assert.Equal(expectedDescription, actualDescription);
}

[Fact]
public void GetDescription_WhenFieldIsNull_ReturnsEnumValueAsString()
{
// Arrange
var testEnum = (TestEnum)999;// This value should not exist in the TestEnum

// Act
var description = testEnum.GetDescription();

// Assert
Assert.Equal(testEnum.ToString(), description);
}
}
}

0 comments on commit fba7e84

Please sign in to comment.