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()}");
        }
示例#2
0
 public void WhereAtLeastOneItemIsGreaterThanValue_WithNoItemsGreater_ShouldBeFalse()
 {
     int[] array = { 1, 2, 3 };
     IsAnEnumerable <int> .WhereAtLeastOneItem(IsGreaterThan.Value(3)).Evaluate(array).Should().BeFalse();
 }
示例#3
0
 public void WhereTheFirstItemIsGreaterThanValue_WithFirstItemNotGreater_ShouldBeFalse()
 {
     int[] array = { 1, 2, 3 };
     IsAnEnumerable <int> .WhereTheFirstItem(IsGreaterThan.Value(1)).Evaluate(array).Should().BeFalse();
 }
示例#4
0
 public void Equal_False()
 {
     IsGreaterThan.Value(1).Evaluate(1).Should().BeFalse();
 }
示例#5
0
 public void Less_False()
 {
     IsGreaterThan.Value(2).Evaluate(1).Should().BeFalse();
 }
示例#6
0
 public void Greater_True()
 {
     IsGreaterThan.Value(1).Evaluate(2).Should().BeTrue();
 }
示例#7
0
 public void WhereCountIsGreaterThanValue_WithHasSizeNotGreater_ShouldBeFalse()
 {
     int[] array = { 1, 2, 3 };
     IsAnEnumerable <int> .WhereTheCount(IsGreaterThan.Value(3)).Evaluate(array).Should().BeFalse();
 }
示例#8
0
 public void WhereTheLastItemIsGreaterThanValue_WithLastItemGreater_ShouldBeTrue()
 {
     int[] array = { 1, 2, 3 };
     IsAnEnumerable <int> .WhereTheLastItem(IsGreaterThan.Value(2)).Evaluate(array).Should().BeTrue();
 }
示例#9
0
 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();
 }