Skip to content

Commit f6edcaf

Browse files
gsscodermoh-hassan
authored andcommitted
Refactored tests with FluentAssertions
1 parent 8d14621 commit f6edcaf

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/CommandLine.Tests/Unit/Issue482Tests.cs

+7-6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using CommandLine.Tests.Fakes;
55
using CommandLine.Text;
66
using Xunit;
7+
using FluentAssertions;
78

89
namespace CommandLine.Tests.Unit
910
{
@@ -40,11 +41,11 @@ public void AutoBuild_without_ordering()
4041
"--version Display version information.",
4142
"value pos. 0"
4243
};
43-
Assert.Equal(expected.Count, helps.Count);
44+
expected.Count.Should().Be(helps.Count);
4445
int i = 0;
4546
foreach (var expect in expected)
4647
{
47-
Assert.Equal(expect.Trim(), helps[i].Trim());
48+
expect.Trim().Should().Be(helps[i].Trim());
4849
i++;
4950
}
5051

@@ -88,11 +89,11 @@ public void AutoBuild_with_ordering()
8889
"--version Display version information.",
8990
"value pos. 0"
9091
};
91-
Assert.Equal(expected.Count, helps.Count);
92+
expected.Count.Should().Be(helps.Count);
9293
int i = 0;
9394
foreach (var expect in expected)
9495
{
95-
Assert.Equal(expect.Trim(), helps[i].Trim());
96+
expect.Trim().Should().Be(helps[i].Trim());
9697
i++;
9798
}
9899

@@ -171,11 +172,11 @@ public void AutoBuild_with_ordering_on_shortName()
171172
"--version Display version information.",
172173
"value pos. 0"
173174
};
174-
Assert.Equal(expected.Count, helps.Count);
175+
expected.Count.Should().Be(helps.Count);
175176
int i = 0;
176177
foreach (var expect in expected)
177178
{
178-
Assert.Equal(expect.Trim(), helps[i].Trim());
179+
expect.Trim().Should().Be(helps[i].Trim());
179180
i++;
180181
}
181182
}

0 commit comments

Comments
 (0)