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); });
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)); });
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>(); });
public IGen <Test> ItIsPure() => from rng in RandomDomainGen.Rng() select Property.ForThese(() => { rng.Next().Should().BeEquivalentTo(rng.Next()); });
public IGen <Test> ItIncrementsTheOrder() => from rng in RandomDomainGen.Rng() select Property.ForThese(() => { rng.Next().Order.Should().Be(rng.Order + 1); });
public IGen <Test> ItReassignsFamily() => from rng in RandomDomainGen.Rng() select Property.ForThese(() => { rng.Fork().Family.Should().NotBe(rng.Family); });
public IGen <Test> ItResetsOrderToZero() => from rng in RandomDomainGen.Rng() select Property.ForThese(() => { rng.Fork().Order.Should().Be(0); });