Json.NET
Code Coverage Statistics for Class

Newtonsoft.Json.Utilities.CollectionUtils

Symbol Coverage: 42.50% (119 of 280)

Branch Coverage: 37.28% (63 of 169)

Method Coverage: 40.54% (15 of 37)

Cyclomatic Complexity Avg: 3.32 Max:17

Methods: 37


Methods

Method Symbol Coverage Branch Coverage Method Coverage Cyclomatic Complexity
<CastValid>b__0<T>(System.Object o) : System.Boolean [static]  0.00% : 0 of 1
N/A : 0 of 0
0.00% : 0 of 1
1
AddRangeDistinct<T>(System.Collections.Generic.IList<T> list,System.Collections.Generic.IEnumerable<T> values) : System.Boolean [static]  0.00% : 0 of 2
0.00% : 0 of 1
0.00% : 0 of 1
1
CastValid<T>(System.Collections.IEnumerable enumerable) : System.Collections.Generic.IEnumerable<T> [static]  0.00% : 0 of 3
0.00% : 0 of 1
0.00% : 0 of 1
1
CreateGenericDictionary(System.Type keyType,System.Type valueType) : System.Collections.IDictionary [static]  0.00% : 0 of 4
0.00% : 0 of 1
0.00% : 0 of 1
1
CreateList<T>(System.Collections.ICollection collection) : System.Collections.Generic.List<T> [static]  0.00% : 0 of 6
0.00% : 0 of 3
0.00% : 0 of 1
2
CreateList<T>(T[] values) : System.Collections.Generic.List<T> [static]  0.00% : 0 of 2
0.00% : 0 of 1
0.00% : 0 of 1
1
CreateListWrapper(System.Object list) : Newtonsoft.Json.Utilities.IWrappedList [static]  0.00% : 0 of 9
0.00% : 0 of 5
0.00% : 0 of 1
4
Distinct<T>(System.Collections.Generic.List<T> collection) : System.Collections.Generic.List<T> [static]  0.00% : 0 of 8
0.00% : 0 of 5
0.00% : 0 of 1
3
Flatten<T>(System.Collections.Generic.IList<T>[] lists) : System.Collections.Generic.List<System.Collections.Generic.List<T>> [static]  0.00% : 0 of 5
0.00% : 0 of 1
0.00% : 0 of 1
1
GetSingleItem<T>(System.Collections.Generic.IList<T> list) : T [static]  0.00% : 0 of 2
0.00% : 0 of 1
0.00% : 0 of 1
1
GroupBy<K,V>(System.Collections.Generic.ICollection<V> source,System.Func<V,K> keySelector) : System.Collections.Generic.Dictionary<K,System.Collections.Generic.List<V>> [static]  0.00% : 0 of 13
0.00% : 0 of 8
0.00% : 0 of 1
5
IsCollectionType(System.Type type) : System.Boolean [static]  0.00% : 0 of 9
0.00% : 0 of 4
0.00% : 0 of 1
4
IsListType(System.Type type) : System.Boolean [static]  0.00% : 0 of 9
0.00% : 0 of 4
0.00% : 0 of 1
4
IsNullOrEmpty(System.Collections.ICollection collection) : System.Boolean [static]  0.00% : 0 of 4
0.00% : 0 of 2
0.00% : 0 of 1
2
IsNullOrEmptyOrDefault<T>(System.Collections.Generic.IList<T> list) : System.Boolean [static]  0.00% : 0 of 4
0.00% : 0 of 2
0.00% : 0 of 1
2
ListEquals<T>(System.Collections.Generic.IList<T> a,System.Collections.Generic.IList<T> b) : System.Boolean [static]  0.00% : 0 of 12
0.00% : 0 of 10
0.00% : 0 of 1
7
Minus<T>(System.Collections.Generic.IList<T> list,System.Collections.Generic.IList<T> minus) : System.Collections.Generic.IList<T> [static]  0.00% : 0 of 9
0.00% : 0 of 8
0.00% : 0 of 1
5
Recurse<T>(System.Collections.Generic.IList<System.Collections.Generic.IList<T>> global,System.Int32 current,System.Collections.Generic.Dictionary<System.Int32,T> currentSet,System.Collections.Generic.List<System.Collections.Generic.List<T>> flattenedResult) : void [static]  0.00% : 0 of 14
0.00% : 0 of 7
0.00% : 0 of 1
4
Slice<T>(System.Collections.Generic.IList<T> list,System.Nullable<System.Int32> start,System.Nullable<System.Int32> end) : System.Collections.Generic.IList<T> [static]  0.00% : 0 of 2
0.00% : 0 of 1
0.00% : 0 of 1
1
Slice<T>(System.Collections.Generic.IList<T> list,System.Nullable<System.Int32> start,System.Nullable<System.Int32> end,System.Nullable<System.Int32> step) : System.Collections.Generic.IList<T> [static]  0.00% : 0 of 20
0.00% : 0 of 20
0.00% : 0 of 1
11
TryGetSingleItem<T>(System.Collections.Generic.IList<T> list,byref T value) : System.Boolean [static]  0.00% : 0 of 2
0.00% : 0 of 1
0.00% : 0 of 1
1
TryGetSingleItem<T>(System.Collections.Generic.IList<T> list,System.Boolean returnDefaultIfEmpty,byref T value) : System.Boolean [static]  0.00% : 0 of 2
0.00% : 0 of 1
0.00% : 0 of 1
1
CreateCollectionWrapper(System.Object list) : Newtonsoft.Json.Utilities.IWrappedCollection [static]  66.67% : 6 of 9
60.00% : 3 of 5
100.00% : 1 of 1
4
CreateDictionaryWrapper(System.Object dictionary) : Newtonsoft.Json.Utilities.IWrappedDictionary [static]  70.00% : 7 of 10
60.00% : 3 of 5
100.00% : 1 of 1
4
AddRange<T>(System.Collections.Generic.IList<T> initial,System.Collections.Generic.IEnumerable<T> collection) : void [static]  77.78% : 7 of 9
85.71% : 6 of 7
100.00% : 1 of 1
5
ContainsValue<TSource>(System.Collections.Generic.IEnumerable<TSource> source,TSource value,System.Collections.Generic.IEqualityComparer<TSource> comparer) : System.Boolean [static]  81.82% : 9 of 11
77.78% : 7 of 9
100.00% : 1 of 1
6
GetSingleItem<T>(System.Collections.Generic.IList<T> list,System.Boolean returnDefaultIfEmpty) : T [static]  83.33% : 5 of 6
66.67% : 4 of 6
100.00% : 1 of 1
4
ToArray(System.Array initial,System.Type type) : System.Array [static]  83.33% : 5 of 6
66.67% : 2 of 3
100.00% : 1 of 1
2
CreateAndPopulateList(System.Type listType,System.Action<System.Collections.IList,System.Boolean> populateList) : System.Object [static]  84.44% : 38 of 45
65.38% : 17 of 26
100.00% : 1 of 1
17
AddDistinct<T>(System.Collections.Generic.IList<T> list,T value) : System.Boolean [static]  100.00% : 2 of 2
100.00% : 1 of 1
100.00% : 1 of 1
1
AddDistinct<T>(System.Collections.Generic.IList<T> list,T value,System.Collections.Generic.IEqualityComparer<T> comparer) : System.Boolean [static]  100.00% : 5 of 5
100.00% : 2 of 2
100.00% : 1 of 1
2
AddRange(System.Collections.IList initial,System.Collections.IEnumerable collection) : void [static]  100.00% : 4 of 4
100.00% : 1 of 1
100.00% : 1 of 1
1
AddRangeDistinct<T>(System.Collections.Generic.IList<T> list,System.Collections.Generic.IEnumerable<T> values,System.Collections.Generic.IEqualityComparer<T> comparer) : System.Boolean [static]  100.00% : 8 of 8
100.00% : 6 of 6
100.00% : 1 of 1
4
CreateGenericList(System.Type listType) : System.Collections.IList [static]  100.00% : 3 of 3
100.00% : 1 of 1
100.00% : 1 of 1
1
IndexOf<T>(System.Collections.Generic.IEnumerable<T> collection,System.Func<T,System.Boolean> predicate) : System.Int32 [static]  100.00% : 9 of 9
100.00% : 5 of 5
100.00% : 1 of 1
4
IsDictionaryType(System.Type type) : System.Boolean [static]  100.00% : 7 of 7
100.00% : 3 of 3
100.00% : 1 of 1
3
IsNullOrEmpty<T>(System.Collections.Generic.ICollection<T> collection) : System.Boolean [static]  100.00% : 4 of 4
100.00% : 2 of 2
100.00% : 1 of 1
2