本文整理汇总了C#中Microsoft.VisualStudio.TestTools.UnitTesting.List.PartialSort方法的典型用法代码示例。如果您正苦于以下问题:C# List.PartialSort方法的具体用法?C# List.PartialSort怎么用?C# List.PartialSort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.VisualStudio.TestTools.UnitTesting.List
的用法示例。
在下文中一共展示了List.PartialSort方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestPartialSortCopy_NullComparer_Throws
public void TestPartialSortCopy_NullComparer_Throws()
{
IReadOnlySublist<List<int>, int> list = new List<int>().ToSublist();
int numberOfItems = 0;
IComparer<int> comparer = null;
list.PartialSort(numberOfItems, comparer);
}
示例2: TestPartialSortAdd_NullComparison_Throws
public void TestPartialSortAdd_NullComparison_Throws()
{
IReadOnlySublist<List<int>, int> list = new List<int>().ToSublist();
int numberOfItems = 0;
Func<int, int, int> comparison = null;
list.PartialSort(numberOfItems, comparison);
}
示例3: TestPartialSortAdd_NullDestination_Throws
public void TestPartialSortAdd_NullDestination_Throws()
{
IReadOnlySublist<List<int>, int> list = new List<int>().ToSublist();
int numberOfItems = 0;
IExpandableSublist<List<int>, int> destination = null;
list.PartialSort(numberOfItems).AddTo(destination);
}
示例4: TestPartialSortAdd_NegativeNumberOfItems_Throws
public void TestPartialSortAdd_NegativeNumberOfItems_Throws()
{
IReadOnlySublist<List<int>, int> list = new List<int>().ToSublist();
int numberOfItems = -1;
list.PartialSort(numberOfItems);
}
示例5: TestPartialSortAdd_WithComparison_NumberOfItemsTooBig_Throws
public void TestPartialSortAdd_WithComparison_NumberOfItemsTooBig_Throws()
{
IReadOnlySublist<List<int>, int> list = new List<int>().ToSublist();
int numberOfItems = 1;
Func<int, int, int> comparison = Comparer<int>.Default.Compare;
list.PartialSort(numberOfItems, comparison);
}
示例6: TestPartialSortAdd_WithComparison_NullDestination_Throws
public void TestPartialSortAdd_WithComparison_NullDestination_Throws()
{
IReadOnlySublist<List<int>, int> list = new List<int>().ToSublist();
int numberOfItems = 0;
IExpandableSublist<List<int>, int> destination = null;
Func<int, int, int> comparison = Comparer<int>.Default.Compare;
list.PartialSort(numberOfItems, comparison).AddTo(destination);
}
示例7: TestPartialSortAdd_WithComparer_NegativeNumberOfItems_Throws
public void TestPartialSortAdd_WithComparer_NegativeNumberOfItems_Throws()
{
IReadOnlySublist<List<int>, int> list = new List<int>().ToSublist();
int numberOfItems = -1;
IComparer<int> comparer = Comparer<int>.Default;
list.PartialSort(numberOfItems, comparer);
}
示例8: TestPartialSortCopy_WithComparer_NullDestination_Throws
public void TestPartialSortCopy_WithComparer_NullDestination_Throws()
{
IReadOnlySublist<List<int>, int> list = new List<int>().ToSublist();
int numberOfItems = 0;
IExpandableSublist<List<int>, int> destination = null;
IComparer<int> comparer = Comparer<int>.Default;
list.PartialSort(numberOfItems, comparer).CopyTo(destination);
}
示例9: TestPartialSortInPlace_NullComparison_Throws
public void TestPartialSortInPlace_NullComparison_Throws()
{
IExpandableSublist<List<int>, int> list = new List<int>().ToSublist();
int numberOfItems = 0;
Func<int, int, int> comparison = null;
list.PartialSort(numberOfItems, comparison);
}
示例10: TestPartialSortInPlace_NegativeNumberOfItems_Throws
public void TestPartialSortInPlace_NegativeNumberOfItems_Throws()
{
IExpandableSublist<List<int>, int> list = new List<int>().ToSublist();
int numberOfItems = -1;
list.PartialSort(numberOfItems);
}
示例11: TestPartialSortInPlace_WithComparison_NegativeNumberOfItems_Throws
public void TestPartialSortInPlace_WithComparison_NegativeNumberOfItems_Throws()
{
IExpandableSublist<List<int>, int> list = new List<int>().ToSublist();
int numberOfItems = -1;
Func<int, int, int> comparison = Comparer<int>.Default.Compare;
list.PartialSort(numberOfItems, comparison);
}
示例12: TestPartialSortInPlace_WithComparer_NumberOfItemsTooBig_Throws
public void TestPartialSortInPlace_WithComparer_NumberOfItemsTooBig_Throws()
{
IExpandableSublist<List<int>, int> list = new List<int>().ToSublist();
int numberOfItems = 1;
IComparer<int> comparer = Comparer<int>.Default;
list.PartialSort(numberOfItems, comparer);
}