NUnit.Framework.CollectionAssert.IsOrdered C# (CSharp) Méthode

IsOrdered() public static méthode

Assert that an array, list or other collection is ordered
public static IsOrdered ( IEnumerable collection ) : void
collection IEnumerable An array, list or other collection implementing IEnumerable
Résultat void
        public static void IsOrdered(IEnumerable collection)
        {
            IsOrdered(collection, string.Empty, null);
        }

Same methods

CollectionAssert::IsOrdered ( IEnumerable collection, IComparer comparer ) : void
CollectionAssert::IsOrdered ( IEnumerable collection, IComparer comparer, string message ) : void
CollectionAssert::IsOrdered ( IEnumerable collection, string message ) : void

Usage Example

        public void SortingByName()
        {
            //arrange
            _driver.Url = _urlForSorting;
            var sortingOnCoreFilteringContext = new SortingOnCoreFilteringContext(_driver);
            var sortingResultContext          = new SortingResultContext(_driver);


            //act
            sortingOnCoreFilteringContext.SelectSortingByName();
            var actualResult = sortingResultContext.GetSortingResultByName();

            //assert
            CollectionAssert.IsOrdered(actualResult, "The sorting result should be in alphabetical order.");
        }
All Usage Examples Of NUnit.Framework.CollectionAssert::IsOrdered