public void RandomlyChangePropertyValues() => CollectionTestHelpers.RandomlyChangePropertyValues(l => l.ActiveDistinct(o => o.Property), l => l.Distinct(new KeyEqualityComparer <IntegerTestClass>(o => o.Property, null)), () => new IntegerTestClass() { Property = RandomGenerator.GenerateRandomInteger() }, o => o.Property = RandomGenerator.GenerateRandomInteger(), true, o => o.Property);
public void RandomlyChangeInnerPropertyValues() => CollectionTestHelpers.RandomlyChangePropertyValues(l => l.ActiveSelect(o => o.IntProperty.ToActiveValue(x => x.Property)), l => l.Select(o => o.IntProperty.Property), GenerateRandom, o => o.IntProperty.Property = RandomGenerator.GenerateRandomInteger());
public void RandomlyChangeOuterPropertyValues() => CollectionTestHelpers.RandomlyChangePropertyValues(l => l.ActiveWhere(o => o.IntProperty.ToActiveValue(x => x.Property % 3 == 0)), l => l.Where(o => o.IntProperty.Property % 3 == 0), GenerateRandom, o => o.IntProperty = new IntegerTestClass() { Property = RandomGenerator.GenerateRandomInteger() });
public void RandomlyChangePropertyValues() => CollectionTestHelpers.RandomlyChangePropertyValues(l => l.ActiveSelect(o => o.Property), l => l.Select(o => o.Property), () => new IntegerTestClass() { Property = RandomGenerator.GenerateRandomInteger() }, o => o.Property = RandomGenerator.GenerateRandomInteger());
public void RandomlyChangePropertyValuesDescending() => CollectionTestHelpers.RandomlyChangePropertyValues(l => l.ActiveOrderBy(o => o.Property, ListSortDirection.Descending), l => l.OrderByDescending(o => o.Property), () => new IntegerTestClass() { Property = RandomGenerator.GenerateRandomInteger() }, o => o.Property = RandomGenerator.GenerateRandomInteger());
public void RandomlyChangePropertyValues() => CollectionTestHelpers.RandomlyChangePropertyValues(l => l.ActiveGroupBy(o => o.Property), l => l.GroupBy(o => o.Property), () => new IntegerTestClass() { Property = RandomGenerator.GenerateRandomInteger(0, 10) }, o => o.Property = RandomGenerator.GenerateRandomInteger(0, 10), false, g => g.Key, (g1, g2) => g1.Zip(g2, (i1, i2) => Equals(i1, i2)).All(b => b));
public void RandomlyReplaceEntirePropertyCollections() => CollectionTestHelpers.RandomlyChangePropertyValues(l => l.ActiveSelectMany(o => o.Property), l => l.SelectMany(o => o.Property), () => new ActiveSelectManyTestClass() { Property = RandomGenerator.GenerateRandomIntegerList() }, o => o.Property = RandomGenerator.GenerateRandomIntegerList());