Beispiel #1
0
        public void ExistsShouldFindThatThereIsNumberBiggerThan40()
        {
            //Arrange
            var expectedResult = true;
            //Act
            var newlyArray = array.Exists(x => x >= 40);

            //Assert
            Assert.AreEqual(expectedResult, newlyArray);
        }
 /// <summary>
 /// Checks for item that meet a given condition.
 /// </summary>
 /// <param name="predicate">Defines the conditions of the element to search for.</param>
 /// <returns><paramref name="true"/> if <paramref name="item"/> was found, otherwise <paramref name="false"/>.</returns>
 public bool Exists(Func <T, bool> predicate)
 {
     return(array.Exists(predicate));
 }