示例#1
0
 public IGen <Test> IfMinimumIsEqualToMaximum_ItReturnsTheValue() =>
 from rng in RandomDomainGen.Rng()
 from value in Gen.Int32()
 select Property.ForThese(() =>
 {
     rng.Value(value, value).Should().Be(value);
 });
示例#2
0
 public IGen <Test> ItIsPure() =>
 from rng in RandomDomainGen.Rng()
 from min in Gen.Int32()
 from max in Gen.Int32().GreaterThanEqual(min)
 select Property.ForThese(() =>
 {
     rng.Value(min, max).Should().Be(rng.Value(min, max));
 });
示例#3
0
        public IGen <Test> IfMinimumIsGreaterThanMaximum_ItThrows() =>
        from rng in RandomDomainGen.Rng()
        from min in Gen.Int32().GreaterThan(int.MinValue)
        from max in Gen.Int32().LessThan(min)
        select Property.ForThese(() =>
        {
            Action test = () => rng.Value(min, max);

            test.Should().Throw <ArgumentOutOfRangeException>();
        });
示例#4
0
 public IGen <Test> ItIsPure() =>
 from rng in RandomDomainGen.Rng()
 select Property.ForThese(() =>
 {
     rng.Next().Should().BeEquivalentTo(rng.Next());
 });
示例#5
0
 public IGen <Test> ItIncrementsTheOrder() =>
 from rng in RandomDomainGen.Rng()
 select Property.ForThese(() =>
 {
     rng.Next().Order.Should().Be(rng.Order + 1);
 });
示例#6
0
 public IGen <Test> ItReassignsFamily() =>
 from rng in RandomDomainGen.Rng()
 select Property.ForThese(() =>
 {
     rng.Fork().Family.Should().NotBe(rng.Family);
 });
示例#7
0
 public IGen <Test> ItResetsOrderToZero() =>
 from rng in RandomDomainGen.Rng()
 select Property.ForThese(() =>
 {
     rng.Fork().Order.Should().Be(0);
 });