本文整理汇总了C#中Verify.ArgumentOutOfRangeException方法的典型用法代码示例。如果您正苦于以下问题:C# Verify.ArgumentOutOfRangeException方法的具体用法?C# Verify.ArgumentOutOfRangeException怎么用?C# Verify.ArgumentOutOfRangeException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Verify
的用法示例。
在下文中一共展示了Verify.ArgumentOutOfRangeException方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CollectionUtilities_RemoveRange_Test6
public void CollectionUtilities_RemoveRange_Test6()
{
using (var verify = new Verify())
{
List<string> target = new List<string>() { "A", "B", "C" };
verify.ArgumentOutOfRangeException("startingIndex", -1, () => CollectionUtilities.RemoveRange(target, -1, 1));
}
}
示例2: CollectionUtilities_InsertRange_Test7
public void CollectionUtilities_InsertRange_Test7()
{
using (var verify = new Verify())
{
List<string> target = new List<string>() { "A", "B", "C" };
List<string> list = new List<string>();
verify.ArgumentOutOfRangeException("startingIndex", 4, () => CollectionUtilities.InsertRange(target, 4, list));
}
}
示例3: ExtendedObservableCollection_SetItemFailTest2
public void ExtendedObservableCollection_SetItemFailTest2()
{
using (var verify = new Verify())
{
var result = new FooCollection();
verify.ArgumentOutOfRangeException("index", 0, () => result.InvokeSetItem(0, null));
}
}
示例4: ExtendedObservableCollection_RemoveItemFailTest2
public void ExtendedObservableCollection_RemoveItemFailTest2()
{
using (var verify = new Verify())
{
var result = new FooCollection();
verify.ArgumentOutOfRangeException("index", 0, result.InvokeRemoveItem);
}
}
示例5: MetadataCache_Test24
public void MetadataCache_Test24()
{
using (var verify = new Verify())
{
var result = MetadataCache.GetMetadata(typeof(Mock));
verify.ArgumentOutOfRangeException("propertyName", "DOES_NOT_EXIST", () =>
{
var p = result.Properties["DOES_NOT_EXIST"];
});
}
}
示例6: WeakReferenceCollection_CopyTo_Test5
public void WeakReferenceCollection_CopyTo_Test5()
{
using (var verify = new Verify())
{
var result = new WeakReferenceCollection<string>();
result.Add("");
var array = new string[0];
verify.ArgumentOutOfRangeException("arrayIndex", -1, () => result.CopyTo(array, -1));
}
}