public void RandomMixedOperations() => ValueTestHelpers.RandomMixedOperations(l => l.ActiveMaxOrDefault(i => i.Property), l => { try { return(l.Max(i => i.Property)); } catch { return(0); } }, () => new IntegerTestClass() { Property = RandomGenerator.GenerateRandomInteger() });
public void RandomMixedOperationsWithPredicate() => ValueTestHelpers.RandomMixedOperations(l => l.ActiveCount(i => i.Property > 50), l => l.Count(i => i.Property > 50), () => new IntegerTestClass() { Property = RandomGenerator.GenerateRandomInteger() });
public void RandomMixedOperations() => ValueTestHelpers.RandomMixedOperations(l => l.ActiveAny(), l => l.Any(), () => new IntegerTestClass() { Property = RandomGenerator.GenerateRandomInteger() });
public void RandomMixedOperations() => ValueTestHelpers.RandomMixedOperations(l => l.ActiveElementAtOrDefault(15), l => l.ElementAtOrDefault(15), RandomGenerator.GenerateRandomInteger);
public void RandomMixedOperations() => ValueTestHelpers.RandomMixedOperations(l => l.ActiveSingleOrDefault(i => i.Property % 20 == 0), l => { try { return(l.SingleOrDefault(i => i.Property % 20 == 0)); } catch { return(null); } }, () => new IntegerTestClass() { Property = RandomGenerator.GenerateRandomInteger() });
public void RandomMixedOperations() => ValueTestHelpers.RandomMixedOperations(l => l.ActiveFirstOrDefault(i => i.Property % 20 == 0), l => l.FirstOrDefault(i => i.Property % 20 == 0), () => new IntegerTestClass() { Property = RandomGenerator.GenerateRandomInteger() });
public void RandomMixedOperations() => ValueTestHelpers.RandomMixedOperations(l => l.ActiveContains(50), l => l.Contains(50), () => RandomGenerator.GenerateRandomInteger(0, 100));