public void TestSortDefaultComparer() { ActivatableList <ICollectionElement> actual = SingleActivatableCollection(); actual.Sort(); List <ICollectionElement> expected = NewPopulatedPlainList(); expected.Sort(); IteratorAssert.AreEqual(expected.GetEnumerator(), actual.GetEnumerator()); }
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)); } }