Skip to content

Commit

Permalink
t Add combination test for multiple of 3 and 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Fyzxs committed Dec 6, 2021
1 parent d667697 commit 575e42a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions TddLikeYouMeanIt/FizzBuzzTests.cs
Expand Up @@ -70,6 +70,25 @@ public void GivenMultipleOf5ReturnsBuzz()
actual.Should().Be(expected);
}

[TestMethod]
public void GivenMultipleOf3And5ReturnsFizzBuzz()
{
//ARRANGE
const int multiplicand = 3 * 5;
const string expected = "FizzBuzz";
List<int> multiplierList = new() { 1, 2, 3 };

int randomIndex = Rand.Next(multiplierList.Count);
int multiplier = multiplierList.ElementAt(randomIndex);
int sourceInput = multiplier * multiplicand;

//ACT
string actual = Transform(sourceInput);

//ASSERT
actual.Should().Be(expected);
}

[TestMethod]
public void Given15ReturnsFizzBuzz()
{
Expand Down

0 comments on commit 575e42a

Please sign in to comment.