예제 #1
0
 public void RandomlyInsertItemsWithPredicate() => ValueTestHelpers.RandomlyInsertItems(l => l.ActiveCount(i => i.Property > 50), l => l.Count(i => i.Property > 50), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger()
 });
예제 #2
0
 public void RandomlyInsertItems() => ValueTestHelpers.RandomlyInsertItems(l => l.ActiveAny(), l => l.Any(), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger()
 });
예제 #3
0
 public void RandomlyInsertItems() => ValueTestHelpers.RandomlyInsertItems(l => l.ActiveMaxOrDefault(i => i.Property), l => { try { return(l.Max(i => i.Property)); } catch { return(0); } }, () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger()
 });
예제 #4
0
 public void RandomlyInsertItems() => ValueTestHelpers.RandomlyInsertItems(l => l.ActiveElementAtOrDefault(15), l => l.ElementAtOrDefault(15), RandomGenerator.GenerateRandomInteger);
 public void RandomlyInsertItems() => ValueTestHelpers.RandomlyInsertItems(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()
 });
예제 #6
0
 public void RandomlyInsertItems() => ValueTestHelpers.RandomlyInsertItems(l => l.ActiveFirstOrDefault(i => i.Property % 20 == 0), l => l.FirstOrDefault(i => i.Property % 20 == 0), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger()
 });
예제 #7
0
 public void RandomlyInsertItems() => ValueTestHelpers.RandomlyInsertItems(l => l.AsActiveValue().ActiveSelect(i => i.Select(o => o.Property).ToArray()), l => l.Select(o => o.Property).ToArray(), () => new IntegerTestClass()
 {
     Property = RandomGenerator.GenerateRandomInteger()
 }, (l1, l2) => l1.SequenceEqual(l2));
예제 #8
0
 public void RandomlyInsertItems() => ValueTestHelpers.RandomlyInsertItems(l => l.ActiveContains(50), l => l.Contains(50), () => RandomGenerator.GenerateRandomInteger(0, 100));