mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-09 23:25:43 +00:00
style(tests): use more meaningful test names
This commit is contained in:
parent
dc0b6abdc4
commit
da08d23aee
@ -29,7 +29,7 @@ internal class CharTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void RepeatShouldBeCorrect()
|
public void Repeat_ShouldReturnRepeatedCharacter_GivenValidCount()
|
||||||
{
|
{
|
||||||
const string expected = "aaaaaaaaaa";
|
const string expected = "aaaaaaaaaa";
|
||||||
string actual = 'a'.Repeat(10);
|
string actual = 'a'.Repeat(10);
|
||||||
@ -38,7 +38,7 @@ internal class CharTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void RepeatOneCountShouldBeLength1String()
|
public void Repeat_ShouldReturnSingleCharString_GivenCount1()
|
||||||
{
|
{
|
||||||
string repeated = 'a'.Repeat(1);
|
string repeated = 'a'.Repeat(1);
|
||||||
Assert.That(repeated, Has.Length.EqualTo(1));
|
Assert.That(repeated, Has.Length.EqualTo(1));
|
||||||
@ -46,13 +46,13 @@ internal class CharTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void RepeatZeroCountShouldBeEmpty()
|
public void Repeat_ShouldReturnEmptyString_GivenCount0()
|
||||||
{
|
{
|
||||||
Assert.That('a'.Repeat(0), Is.EqualTo(string.Empty));
|
Assert.That('a'.Repeat(0), Is.EqualTo(string.Empty));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void RepeatNegativeCountShouldThrow()
|
public void Repeat_ShouldThrowArgumentOutOfRangeException_GivenNegativeCount()
|
||||||
{
|
{
|
||||||
Assert.Throws<ArgumentOutOfRangeException>(() => _ = 'a'.Repeat(-1));
|
Assert.Throws<ArgumentOutOfRangeException>(() => _ = 'a'.Repeat(-1));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user