Skip to content

Commit 8813510

Browse files
committed
Simplifies enum test and improves readability.
Refactors enum test to use a more descriptive name. Improves code readability by explicitly declaring the type of the result variable in the GetSentencesTest method and marking the _numbers array as readonly.
1 parent 09b42ee commit 8813510

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/Exceptionless.RandomData.Tests/RandomDataTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ public void RandomDecimal() {
2020

2121
[Fact]
2222
public void GetEnumWithOneValueTest() {
23-
var result = RandomData.GetEnum<_days>();
23+
var result = RandomData.GetEnum<Days>();
2424

25-
Assert.Equal<_days>(_days.Monday, result);
25+
Assert.Equal(Days.Monday, result);
2626
}
2727

2828
[Fact]
2929
public void GetSentencesTest() {
30-
var result = RandomData.GetSentence();
30+
string result = RandomData.GetSentence();
3131

3232
Assert.False(String.IsNullOrEmpty(result));
3333
}
3434

35-
private int[] _numbers = [1, 2, 3];
35+
private readonly int[] _numbers = [1, 2, 3];
3636

37-
private enum _days {
37+
private enum Days {
3838
Monday
3939
}
4040
}

0 commit comments

Comments
 (0)