public static void Max_Other_SomeNull(Labeled <ParallelQuery <int> > labeled, int count, int max) { ParallelQuery <int> query = labeled.Item; Assert.Equal(max, query.Max(x => x >= count / 2 ? DelgatedComparable.Delegate(x, Comparer <int> .Default) : null).Value); Assert.Equal(count / 2, query.Max(x => x >= count / 2 ? DelgatedComparable.Delegate(x, ReverseComparer.Instance) : null).Value); }
public static void Max_Other(Labeled <ParallelQuery <int> > labeled, int count, int max) { ParallelQuery <int> query = labeled.Item; Assert.Equal(max, query.Select(x => DelgatedComparable.Delegate(x, Comparer <int> .Default)).Max().Value); Assert.Equal(0, query.Select(x => DelgatedComparable.Delegate(x, ReverseComparer.Instance)).Max().Value); }