Exemplo n.º 1
0
        public void IsSortedShouldBeFalseForNulls()
        {
            var collection = new StringCollection();

            collection.Add("a");
            collection.Add("b");
            collection.Add(null);

            var result = collection.IsSorted();

            Assert.False(result);
        }
Exemplo n.º 2
0
        public void IsSortedShouldBeTrueForSorted(bool correctResult, params string[] values)
        {
            // arrange
            var collection = new StringCollection();

            foreach (var item in values)
            {
                collection.Add(item);
            }

            // act
            var result = collection.IsSorted();

            // assert
            Assert.Equal(correctResult, result);
        }