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