public void RandomlyChangePropertyValues() => CollectionTestHelpers.RandomlyChangePropertyValuesInTwoCollections((l1, l2) => l1.ActiveZip(l2, (i1, i2) => i1.Property + i2.OtherProperty), (l1, l2) => l1.Zip(l2, (i1, i2) => i1.Property + i2.OtherProperty), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger()
 }, () => new ActiveZipTestClass()
 {
     OtherProperty = RandomGenerator.GenerateRandomInteger()
 }, o => o.Property = RandomGenerator.GenerateRandomInteger(), o => o.OtherProperty = RandomGenerator.GenerateRandomInteger());
示例#2
0
 public void RandomlyMoveItems() => CollectionTestHelpers.RandomlyMoveItemsWithinTwoCollections((l1, l2) => l1.ActiveInnerJoin(l2, l => l.Property, r => r.Property, (l, r) => l.Property + r.Property), (l1, l2) => l1.InnerJoin(l2, l => l.Property, r => r.Property, (l, r) => l.Property + r.Property), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger(0, 100)
 }, () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger(0, 100)
 });
 public void ResetWithRandomItems() => CollectionTestHelpers.ResetTwoCollectionsWithRandomItems((l1, l2) => l1.ActiveLeftJoin(l2, l => l.Property, r => r.Property, (l, r) => l.Property + r.Match(v => v.Property, 0)), (l1, l2) => l1.LeftJoin(l2, l => l.Property, r => r.Property, (l, r) => l.Property + r.Match(v => v.Property, 0)), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger(0, 100)
 }, () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger(0, 100)
 });
 public void RandomlyChangePropertyValues() => CollectionTestHelpers.RandomlyChangePropertyValuesInTwoCollections((l1, l2) => l1.ActiveExcept(l2, o => o.Property), (l1, l2) => l1.Except(l2, new KeyEqualityComparer <IntegerTestClass>(o => o.Property, null)), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger()
 }, () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger()
 }, o => o.Property = RandomGenerator.GenerateRandomInteger(), o => o.Property = RandomGenerator.GenerateRandomInteger(), true, o => o.Property);
 public void RandomlyRemoveItems() => CollectionTestHelpers.RandomlyRemoveItemsFromTwoCollections((l1, l2) => l1.ActiveLeftExcludingJoin(l2, l => l.Property, r => r.Property, (l, r) => l.Property + r.Match(v => v.Property, 0)), (l1, l2) => l1.LeftExcludingJoin(l2, l => l.Property, r => r.Property, (l, r) => l.Property + r.Match(v => v.Property, 0)), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger(0, 100)
 }, () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger(0, 100)
 });
 public void RandomlyReplaceItems() => CollectionTestHelpers.RandomlyReplaceItemsInTwoCollections((l1, l2) => l1.ActiveOuterJoin(l2, l => l.Property, r => r.Property, (l, r) => l.Match(v => v.Property, 0) + r.Match(v => v.Property, 0)), (l1, l2) => l1.OuterJoin(l2, l => l.Property, r => r.Property, (l, r) => l.Match(v => v.Property, 0) + r.Match(v => v.Property, 0)), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger(0, 100)
 }, () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger(0, 100)
 });
 public void RandomlyMoveItems() => CollectionTestHelpers.RandomlyMoveItemsWithinTwoCollections((l1, l2) => l1.ActiveRightExcludingJoin(l2, l => l.Property, r => r.Property, (l, r) => l.Match(v => v.Property, 0) + r.Property), (l1, l2) => l1.RightExcludingJoin(l2, l => l.Property, r => r.Property, (l, r) => l.Match(v => v.Property, 0) + r.Property), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger(0, 100)
 }, () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger(0, 100)
 });
 public void RandomlyChangeParameter() => CollectionTestHelpers.RandomlyChangeParameterInTwoCollections((l1, l2, p) => l1.ActiveLeftJoin(l2, p, (l, i) => l.Property + i.Property, (r, i) => r.Property + i.Property, (l, r, i) => l.Property + r.Match(v => v.Property, 0) + i.Property), (l1, l2, p) => l1.LeftJoin(l2, i => i.Property + p.Property, i => i.Property + p.Property, (i1, i2) => i1.Property + i2.Match(v => v.Property, 0) + p.Property), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger(0, 100)
 }, () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger(0, 100)
 });
 public void RandomlyChangeKeyValues() => CollectionTestHelpers.RandomlyChangePropertyValuesInTwoCollections((l1, l2) => l1.ActiveOuterJoin(l2, l => l.Key, r => r.Key, (l, r) => l.Match(v => v.Property, 0) + (r.HasValue ? r.Value.Property : 0)), (l1, l2) => l1.OuterJoin(l2, l => l.Key, r => r.Key, (l, r) => l.Match(v => v.Property, 0) + (r.HasValue ? r.Value.Property : 0)), () => RandomGenerator.GenerateRandomTestClass(), () => RandomGenerator.GenerateRandomTestClass(), o => o.Key = RandomGenerator.GenerateRandomInteger(), o => o.Key = RandomGenerator.GenerateRandomInteger());
 public void RandomlyMoveItems() => CollectionTestHelpers.RandomlyMoveItems(l => l.ActiveWhere(o => o.IntProperty.ToActiveValue(x => x.Property % 3 == 0)), l => l.Where(o => o.IntProperty.Property % 3 == 0), GenerateRandom);
 public void RandomlyChangeParameter() => CollectionTestHelpers.RandomlyChangeParameter((l, p) => l.ActiveDistinct(p, (o, i) => o.Property * i.Property), (l, p) => l.Distinct(new KeyEqualityComparer <IntegerTestClass>(o => o.Property * p.Property, null)), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger()
 }, true);
 public void ResetWithRandomItemsWhenFilteringForClassType() => CollectionTestHelpers.ResetWithRandomItems(l => l.ActiveOfType <IntegerTestClass>(), l => l.OfType <IntegerTestClass>(), GenerateRandomObject);
 public void RandomlyChangeParameter() => CollectionTestHelpers.RandomlyChangeParameterInTwoCollections((l1, l2, p) => l1.ActiveZip(l2, p, (i1, i2, i) => i1 + i2 + i.Property), (l1, l2, p) => l1.Zip(l2, (i1, i2) => i1 + i2 + p.Property), () => RandomGenerator.GenerateRandomInteger(0, 10), () => RandomGenerator.GenerateRandomInteger(0, 10));
示例#14
0
 public void RandomlyRemoveItems() => CollectionTestHelpers.RandomlyRemoveItems(l => l.ActiveReverse(), l => l.Reverse(), RandomGenerator.GenerateRandomInteger);
 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 ResetWithRandomItems() => CollectionTestHelpers.ResetWithRandomItems(l => l.ActiveSelect(o => o.IntProperty.ToActiveValue(x => x.Property)), l => l.Select(o => o.IntProperty.Property), GenerateRandom);
 public void RandomlyChangeParameter() => CollectionTestHelpers.RandomlyChangeParameter((l, p) => l.ActiveSelect(p, (o, i) => o.IntProperty.ToActiveValue(x => x.Property * i.Property)), (l, p) => l.Select(o => o.IntProperty.Property * p.Property), GenerateRandom);
 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 ResetWithRandomItems() => CollectionTestHelpers.ResetWithRandomItems(l => l.ActiveDistinct(), l => l.Distinct(), () => RandomGenerator.GenerateRandomInteger(0, 10), true);
 public void RandomlyReplaceItems() => CollectionTestHelpers.RandomlyReplaceItemsInTwoCollections((l1, l2) => l1.ActiveZip(l2, (i1, i2) => i1 + i2), (l1, l2) => l1.Zip(l2, (i1, i2) => i1 + i2), () => RandomGenerator.GenerateRandomInteger(0, 10), () => RandomGenerator.GenerateRandomInteger(0, 10));
 public void RandomlyChangeKeyValues() => CollectionTestHelpers.RandomlyChangePropertyValuesInTwoCollections((l1, l2) => l1.ActiveRightExcludingJoin(l2, l => l.Key, r => r.Key, (l, r) => l.Match(v => v.Property, 0) + r.Property), (l1, l2) => l1.RightExcludingJoin(l2, l => l.Key, r => r.Key, (l, r) => l.Match(v => v.Property, 0) + r.Property), () => RandomGenerator.GenerateRandomTestClass(), () => RandomGenerator.GenerateRandomTestClass(), o => o.Key = RandomGenerator.GenerateRandomInteger(), o => o.Key = RandomGenerator.GenerateRandomInteger());
 public void RandomlyChangePropertyValues() => CollectionTestHelpers.RandomlyChangePropertyValuesInTwoCollections((l1, l2) => l1.ActiveLeftJoin(l2, l => l.Key, r => r.Key, (l, r) => l.Property + r.Match(v => v.Property, 0)), (l1, l2) => l1.LeftJoin(l2, l => l.Key, r => r.Key, (l, r) => l.Property + r.Match(v => v.Property, 0)), () => RandomGenerator.GenerateRandomTestClass(), () => RandomGenerator.GenerateRandomTestClass(), o => o.Property = RandomGenerator.GenerateRandomInteger(), o => o.Property = RandomGenerator.GenerateRandomInteger());
 public void ResetWithRandomItemsWhenFilteringForValueType() => CollectionTestHelpers.ResetWithRandomItems(l => l.ActiveOfType <int>(), l => l.OfType <int>(), GenerateRandomObject);
 public void RandomlyReplaceItems() => CollectionTestHelpers.RandomlyReplaceItems(l => l.ActiveSkip(5), l => l.Skip(5), RandomGenerator.GenerateRandomInteger);
 public void ResetWithRandomItems() => CollectionTestHelpers.ResetTwoCollectionsWithRandomItems((l1, l2) => l1.ActiveZip(l2, (i1, i2) => i1 + i2), (l1, l2) => l1.Zip(l2, (i1, i2) => i1 + i2), () => RandomGenerator.GenerateRandomInteger(0, 10), () => RandomGenerator.GenerateRandomInteger(0, 10));
 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 RandomlyMoveItems() => CollectionTestHelpers.RandomlyMoveItems(l => l.ActiveTake(50), l => l.Take(50), RandomGenerator.GenerateRandomInteger);
 public void ResetWithRandomItems() => CollectionTestHelpers.ResetWithRandomItems(ActiveGroupByThenActiveSelectManyWithActiveOrderBy, GroupByThenSelectManyWithOrderBy, () => (RandomGenerator.GenerateRandomInteger(0, 10), RandomGenerator.GenerateRandomInteger()));
 public void ResetWithRandomItems() => CollectionTestHelpers.ResetWithRandomItems(l => l.ActiveSkip(5), l => l.Skip(5), RandomGenerator.GenerateRandomInteger);
 public void RandomlyChangeParameter() => CollectionTestHelpers.RandomlyChangeParameter((l, p) => l.ActiveWhere(p, (o, i) => o.IntProperty.ToActiveValue(x => (x.Property * i.Property) % 3 == 0)), (l, p) => l.Where(o => (o.IntProperty.Property * p.Property) % 3 == 0), GenerateRandom);