public void WhereTheItemAtPositionIsGreaterThanValue_WithNotExistentItemInPosition_ShouldThrowException() { int[] array = { 1, 2, 3 }; int index = 3; Action act = () => IsAnEnumerable <int> .WhereTheItemAtPosition(index, IsGreaterThan.Value(2)).Evaluate(array); act.Should().Throw <ScreenplayException>() .WithMessage($"Index {index} is out of range for the IEnumerable<{typeof(int)}> with count {array.Count()}"); }
public void WhereAtLeastOneItemIsGreaterThanValue_WithNoItemsGreater_ShouldBeFalse() { int[] array = { 1, 2, 3 }; IsAnEnumerable <int> .WhereAtLeastOneItem(IsGreaterThan.Value(3)).Evaluate(array).Should().BeFalse(); }
public void WhereTheFirstItemIsGreaterThanValue_WithFirstItemNotGreater_ShouldBeFalse() { int[] array = { 1, 2, 3 }; IsAnEnumerable <int> .WhereTheFirstItem(IsGreaterThan.Value(1)).Evaluate(array).Should().BeFalse(); }
public void Equal_False() { IsGreaterThan.Value(1).Evaluate(1).Should().BeFalse(); }
public void Less_False() { IsGreaterThan.Value(2).Evaluate(1).Should().BeFalse(); }
public void Greater_True() { IsGreaterThan.Value(1).Evaluate(2).Should().BeTrue(); }
public void WhereCountIsGreaterThanValue_WithHasSizeNotGreater_ShouldBeFalse() { int[] array = { 1, 2, 3 }; IsAnEnumerable <int> .WhereTheCount(IsGreaterThan.Value(3)).Evaluate(array).Should().BeFalse(); }
public void WhereTheLastItemIsGreaterThanValue_WithLastItemGreater_ShouldBeTrue() { int[] array = { 1, 2, 3 }; IsAnEnumerable <int> .WhereTheLastItem(IsGreaterThan.Value(2)).Evaluate(array).Should().BeTrue(); }
public void WhereEveryItemIsGreaterThanValue_WithAllItemsGreater_ShouldBeTrue() { int[] array = { 1, 2, 3 }; IsAnEnumerable <int> .WhereEveryItem(IsGreaterThan.Value(0)).Evaluate(array).Should().BeTrue(); }
public void WhereTheItemAtPositionIsGreaterThanValue_WithItemAtPositionNotGreater_ShouldBeFalse() { int[] array = { 1, 2, 3 }; IsAnEnumerable <int> .WhereTheItemAtPosition(1, IsGreaterThan.Value(2)).Evaluate(array).Should().BeFalse(); }