public static void ToDictionary_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.ToDictionary(x => x)); AssertThrows.AlreadyCanceled(source => source.ToDictionary(x => x, EqualityComparer <int> .Default)); AssertThrows.AlreadyCanceled(source => source.ToDictionary(x => x, y => y)); AssertThrows.AlreadyCanceled(source => source.ToDictionary(x => x, y => y, EqualityComparer <int> .Default)); }
public static void CountLongCount_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.Count()); AssertThrows.AlreadyCanceled(source => source.Count(x => true)); AssertThrows.AlreadyCanceled(source => source.LongCount()); AssertThrows.AlreadyCanceled(source => source.LongCount(x => true)); }
public static void SequenceEqual_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.SequenceEqual(ParallelEnumerable.Range(0, 2))); AssertThrows.AlreadyCanceled(source => source.SequenceEqual(ParallelEnumerable.Range(0, 2), new ModularCongruenceComparer(1))); AssertThrows.AlreadyCanceled(source => ParallelEnumerable.Range(0, 2).SequenceEqual(source)); AssertThrows.AlreadyCanceled(source => ParallelEnumerable.Range(0, 2).SequenceEqual(source, new ModularCongruenceComparer(1))); }
public static void First_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.First()); AssertThrows.AlreadyCanceled(source => source.First(x => true)); AssertThrows.AlreadyCanceled(source => source.FirstOrDefault()); AssertThrows.AlreadyCanceled(source => source.FirstOrDefault(x => true)); }
public static void Aggregate_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.Aggregate((i, j) => i)); AssertThrows.AlreadyCanceled(source => source.Aggregate(0, (i, j) => i)); AssertThrows.AlreadyCanceled(source => source.Aggregate(0, (i, j) => i, i => i)); AssertThrows.AlreadyCanceled(source => source.Aggregate(0, (i, j) => i, (i, j) => i, i => i)); AssertThrows.AlreadyCanceled(source => source.Aggregate(() => 0, (i, j) => i, (i, j) => i, i => i)); }
public static void Sum_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.Sum(x => x)); AssertThrows.AlreadyCanceled(source => source.Sum(x => (int?)x)); AssertThrows.AlreadyCanceled(source => source.Sum(x => (long)x)); AssertThrows.AlreadyCanceled(source => source.Sum(x => (long?)x)); AssertThrows.AlreadyCanceled(source => source.Sum(x => (float)x)); AssertThrows.AlreadyCanceled(source => source.Sum(x => (float?)x)); AssertThrows.AlreadyCanceled(source => source.Sum(x => (double)x)); AssertThrows.AlreadyCanceled(source => source.Sum(x => (double?)x)); AssertThrows.AlreadyCanceled(source => source.Sum(x => (decimal)x)); AssertThrows.AlreadyCanceled(source => source.Sum(x => (decimal?)x)); }
public static void Max_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.Max(x => x)); AssertThrows.AlreadyCanceled(source => source.Max(x => (int?)x)); AssertThrows.AlreadyCanceled(source => source.Max(x => (long)x)); AssertThrows.AlreadyCanceled(source => source.Max(x => (long?)x)); AssertThrows.AlreadyCanceled(source => source.Max(x => (float)x)); AssertThrows.AlreadyCanceled(source => source.Max(x => (float?)x)); AssertThrows.AlreadyCanceled(source => source.Max(x => (double)x)); AssertThrows.AlreadyCanceled(source => source.Max(x => (double?)x)); AssertThrows.AlreadyCanceled(source => source.Max(x => (decimal)x)); AssertThrows.AlreadyCanceled(source => source.Max(x => (decimal?)x)); AssertThrows.AlreadyCanceled(source => source.Max(x => new NotComparable(x))); }
public static void ToArray_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.ToArray()); }
public static void Contains_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.Contains(0)); AssertThrows.AlreadyCanceled(source => source.Contains(0, EqualityComparer <int> .Default)); }
public static void All_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.All(x => true)); }
public static void ElementAt_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.ElementAt(0)); AssertThrows.AlreadyCanceled(source => source.ElementAtOrDefault(0)); }
public static void Single_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.Single()); AssertThrows.AlreadyCanceled(source => source.Single(x => true)); }