Skip to content

Commit

Permalink
Added second test
Browse files Browse the repository at this point in the history
Bring coverage 2/2
  • Loading branch information
christopherbauer committed Sep 19, 2015
1 parent fe8ca0a commit 20cca16
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,25 @@ public void ThenShouldThrowArgumentOutOfRangeExceptionGivenToExclusiveLessThan0(
Assert.Throws<ArgumentOutOfRangeException>(() => EnumerableExtensions.SteppedRange(0, -9, -3));
}
}

/// <summary>
/// The when stepped range with function.
/// </summary>
[TestFixture]
public class WhenSteppedRangeWithFunction
{
/// <summary>
/// The then return 0 to 9 given function 0 then i less than 10 then 1.
/// </summary>
[Test]
public void ThenReturn0To9GivenFunction0ThenILessThan10Then1()
{
// Arrange // Act
var enumerable = EnumerableExtensions.SteppedRange(0, i => i < 10, 1);

// Assert
Assert.That(enumerable, Is.EquivalentTo(new List<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }));
}
}
}
}

0 comments on commit 20cca16

Please sign in to comment.