style(tests): use Has.Length for length assertion

This commit is contained in:
Oliver Booth 2023-08-27 03:48:41 +01:00
parent 45ffd08dda
commit dc0b6abdc4
Signed by: oliverbooth
GPG Key ID: B89D139977693FED
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ internal class CharTests
public void RepeatOneCountShouldBeLength1String() public void RepeatOneCountShouldBeLength1String()
{ {
string repeated = 'a'.Repeat(1); string repeated = 'a'.Repeat(1);
Assert.That(repeated.Length, Is.EqualTo(1)); Assert.That(repeated, Has.Length.EqualTo(1));
Assert.That(repeated, Is.EqualTo("a")); Assert.That(repeated, Is.EqualTo("a"));
} }