当前位置: 首页>>代码示例>>C#>>正文


C# List.PartialSort方法代码示例

本文整理汇总了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);
 }
开发者ID:jehugaleahsa,项目名称:NDex,代码行数:7,代码来源:PartialSortCopyTester.cs

示例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);
 }
开发者ID:jehugaleahsa,项目名称:NDex,代码行数:7,代码来源:PartialSortAddTester.cs

示例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);
 }
开发者ID:jehugaleahsa,项目名称:NDex,代码行数:7,代码来源:PartialSortAddTester.cs

示例4: TestPartialSortAdd_NegativeNumberOfItems_Throws

 public void TestPartialSortAdd_NegativeNumberOfItems_Throws()
 {
     IReadOnlySublist<List<int>, int> list = new List<int>().ToSublist();
     int numberOfItems = -1;
     list.PartialSort(numberOfItems);
 }
开发者ID:jehugaleahsa,项目名称:NDex,代码行数:6,代码来源:PartialSortAddTester.cs

示例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);
 }
开发者ID:jehugaleahsa,项目名称:NDex,代码行数:7,代码来源:PartialSortAddTester.cs

示例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);
 }
开发者ID:jehugaleahsa,项目名称:NDex,代码行数:8,代码来源:PartialSortAddTester.cs

示例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);
 }
开发者ID:jehugaleahsa,项目名称:NDex,代码行数:7,代码来源:PartialSortAddTester.cs

示例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);
 }
开发者ID:jehugaleahsa,项目名称:NDex,代码行数:8,代码来源:PartialSortCopyTester.cs

示例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);
 }
开发者ID:jehugaleahsa,项目名称:NDex,代码行数:7,代码来源:PartialSortInPlaceTester.cs

示例10: TestPartialSortInPlace_NegativeNumberOfItems_Throws

 public void TestPartialSortInPlace_NegativeNumberOfItems_Throws()
 {
     IExpandableSublist<List<int>, int> list = new List<int>().ToSublist();
     int numberOfItems = -1;
     list.PartialSort(numberOfItems);
 }
开发者ID:jehugaleahsa,项目名称:NDex,代码行数:6,代码来源:PartialSortInPlaceTester.cs

示例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);
 }
开发者ID:jehugaleahsa,项目名称:NDex,代码行数:7,代码来源:PartialSortInPlaceTester.cs

示例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);
 }
开发者ID:jehugaleahsa,项目名称:NDex,代码行数:7,代码来源:PartialSortInPlaceTester.cs


注:本文中的Microsoft.VisualStudio.TestTools.UnitTesting.List.PartialSort方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。