Пример #1
0
 public void ExtendedObservableCollection_RemoveItemFailTest2()
 {
     using (var verify = new Verify())
     {
         var result = new FooCollection();
         verify.ArgumentOutOfRangeException("index", 0, result.InvokeRemoveItem);
     }
 }
Пример #2
0
 public void ExtendedObservableCollection_SetItemFailTest2()
 {
     using (var verify = new Verify())
     {
         var result = new FooCollection();
         verify.ArgumentOutOfRangeException("index", 0, () => result.InvokeSetItem(0, null));
     }
 }
Пример #3
0
 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));
     }
 }
Пример #4
0
 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"];
         });
     }
 }
Пример #5
0
 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));
     }
 }
Пример #6
0
 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));
     }
 }
Пример #7
0
 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));
     }
 }
Пример #8
0
        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));

            }
        }
 public void ExtendedObservableCollection_SetItemFailTest2()
 {
     using (var verify = new Verify())
     {
         var result = new FooCollection();
         verify.ArgumentOutOfRangeException("index", 0, () => result.InvokeSetItem(0, null));
     }
 }
 public void ExtendedObservableCollection_RemoveItemFailTest2()
 {
     using (var verify = new Verify())
     {
         var result = new FooCollection();
         verify.ArgumentOutOfRangeException("index", 0, result.InvokeRemoveItem);
     }
 }
Пример #11
0
 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"];
         });
     }
 }
 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));
     }
 }