Skip to content

Commit

Permalink
Adopt params IEnumerable
Browse files Browse the repository at this point in the history
  • Loading branch information
Romfos committed Dec 25, 2024
1 parent bbcbb0c commit c2338c1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/TestFixture.Tests/Services/TestFixtureBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,42 @@ internal sealed class TestFixtureBuilder
{
private readonly IRandomService substitute = Substitute.For<IRandomService>();

public TestFixtureBuilder With(params int[] values)
public TestFixtureBuilder With(params IEnumerable<int> values)
{
var queue = new Queue<int>(values);
substitute.Int32.Returns(x => queue.Dequeue());
return this;
}

public TestFixtureBuilder With(params double[] values)
public TestFixtureBuilder With(params IEnumerable<double> values)
{
var queue = new Queue<double>(values);
substitute.Double.Returns(x => queue.Dequeue());
return this;
}

public TestFixtureBuilder With(params Guid[] values)
public TestFixtureBuilder With(params IEnumerable<Guid> values)
{
var queue = new Queue<Guid>(values);
substitute.Guid.Returns(x => queue.Dequeue());
return this;
}

public TestFixtureBuilder With(params string[] values)
public TestFixtureBuilder With(params IEnumerable<string> values)
{
var queue = new Queue<string>(values);
substitute.String.Returns(x => queue.Dequeue());
return this;
}

public TestFixtureBuilder With(params long[] values)
public TestFixtureBuilder With(params IEnumerable<long> values)
{
var queue = new Queue<long>(values);
substitute.Int64.Returns(x => queue.Dequeue());
return this;
}

public TestFixtureBuilder With(params DateTime[] values)
public TestFixtureBuilder With(params IEnumerable<DateTime> values)
{
var queue = new Queue<DateTime>(values);
substitute.DateTime.Returns(x => queue.Dequeue());
Expand Down

0 comments on commit c2338c1

Please sign in to comment.