Example #1
0
        public void ZipWriteOnlyStorer_AddPathNull_ValidateNotNull()
        {
            var storer = new ZipWriteOnlyStorer(false, true);

            AssertValidation.NotNull(
                () => storer.Add(null, 0, 0),
                "Path");
        }
Example #2
0
        public void ZipWriteOnlyStorer_AddDataNull_ValidateNotNull()
        {
            var storer = new ZipWriteOnlyStorer(false, true);

            AssertValidation.NotNull(
                () => storer.Add("File.data", null),
                "Data");
        }
        public void CreateReturnParameterlessMethod_TypeNull_ValidateIsNull()
        {
            Type type = typeof(ClassWithReturnParameterlessMethods <>).MakeGenericType(typeof(int));

            AssertValidation.NotNull(
                () => ReflectionUtils.CreateReturnParameterlessMethodCallback(null, type.GetMethod(StaticMethodName)),
                "Type");
        }
        public void CreateReturnlessOneParameterMethod_MethodInfoNull_ValidateIsNull()
        {
            Type type = typeof(ClassWithReturnlessOneParameterMethods <>).MakeGenericType(typeof(int));

            AssertValidation.NotNull(
                () => ReflectionUtils.CreateReturnlessOneParameterMethodCallback(type, null),
                "MethodInfo");
        }
 public void Select1D_ArrayNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => (null as int[]).Select((v, i) => v),
         "Source");
 }
 public void Clone2D_ArrayNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => ArrayUtils.Clone(null as int[, ]),
         "Source");
 }
 public void GetFullMessage_ExceptionNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => (null as Exception).GetFullMessage(),
         "Exception");
 }
Example #8
0
 public void Split_NullInputString_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => StringUtils.Split(null, '\n').Count(),
         "InputString");
 }
Example #9
0
 public void CreateEnumerable_EnumerableGTDNull_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => ReflectionUtils.CreateEnumerable(null, typeof(int), 0),
         "EnumerableGTD");
 }
 public void Find_PredicateNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => (new LinkedList <int>()).Find(null),
         "Predicate");
 }
 public void Combine_1SeparatorStringsNull_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => StringUtils.Combine('\n', null),
         "Strings");
 }
Example #12
0
 public void QuickSortArrayAndAssociatedArray_AssociatedArrayNull_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => SortUtils.QuickSort(true, elementComparer, new Element[6], null as IList <Element>[]),
         "AssociatedLists");
 }
Example #13
0
 public void Deserialize_DataNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => formatter.Deserialize <int>(null),
         "Data");
 }
Example #14
0
 public void Serialize_GraphNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => formatter.Serialize <string>(null),
         "Graph");
 }
 public void GetString_NullBytes_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => StringUtils.GetString(null),
         "Data");
 }
 public void GetBytes_NullInputString_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => StringUtils.GetBytes(null),
         "InputString");
 }
Example #17
0
 public void Select1D_SelectorNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => (new int[0]).Select <int, long>(null),
         "Selector");
 }
 public void ExecuteAndClear_ActionNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => (new LinkedList <int>()).ExecuteAndClear(null),
         "Action");
 }
Example #19
0
 public void QuickSortOnlyArray_ArrayNull_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => SortUtils.QuickSort(true, elementComparer, null),
         "List");
 }
 public void Combine_StringsNull_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => StringUtils.Combine(null),
         "Strings");
 }
 public void ExecuteAndClear_ListNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => (null as LinkedList <int>).ExecuteAndClear(i => {}),
         "List");
 }
Example #22
0
 public void ZipReadOnlyStorer_FromDataNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => ZipReadOnlyStorer.FromData(null),
         "Data");
 }
 public void Find_ListNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => (null as LinkedList <int>).Find(i => true),
         "List");
 }
Example #24
0
 public void ZipReadOnlyStorer_ReadEntryNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => ZipReadOnlyStorer.FromData(zip32Empty).Read(null),
         "Entry");
 }
 public void ToArray_ListNull_ValidateNotNull()
 {
     AssertValidation.NotNull(
         () => (null as LinkedList <int>).ToArray(),
         "List");
 }
 public void CreateGetAccessorProperty_PropertyInfoNull_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => ReflectionUtils.CreateGetAccessor(this.GetType(), null as PropertyInfo),
         "PropertyInfo");
 }
Example #27
0
 public void CreateEnumerable_ElementTypeNull_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => ReflectionUtils.CreateEnumerable(typeof(List <>), null, 0),
         "ElementType");
 }
 public void CreateSetAccessorProperty_TypeNull_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => ReflectionUtils.CreateSetAccessor(null, typeof(ClassWithProperties <>).MakeGenericType(typeof(object)).GetProperty(StaticFieldName)),
         "Type");
 }
Example #29
0
 public void Split_NullSeparators_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => StringUtils.Split("", null).Count(),
         "Separators");
 }
 public void CreateDictonary_ValueTypeNull_ValidateIsNull()
 {
     AssertValidation.NotNull(
         () => ReflectionUtils.CreateDictionary(typeof(Dictionary <,>), typeof(int), null, 0),
         "ValueType");
 }