Пример #1
0
        public void TestSortDefaultComparer()
        {
            ActivatableList <ICollectionElement> actual = SingleActivatableCollection();

            actual.Sort();

            List <ICollectionElement> expected = NewPopulatedPlainList();

            expected.Sort();

            IteratorAssert.AreEqual(expected.GetEnumerator(), actual.GetEnumerator());
        }
Пример #2
0
        public void TestBinarySearch1()
        {
            ActivatableList <ICollectionElement> collection = SingleActivatableCollection();

            collection.Sort();
            int count = collection.Count;

            Reopen();

            foreach (string name in Names)
            {
                Assert.IsGreaterOrEqual(0, SingleActivatableCollection().BinarySearch(0, count, new ActivatableElement(name), SimpleComparer.Instance));
            }
        }