public LineItem LineItem() { return(new LineItem { Id = GetUniqueId(), Order = Order(), Product = Product(), Quantity = ARandom.IntBetween(1, 10), UnitPrice = ARandom.DoubleBetween(1, 100) }); }
public void when_given_that_same_min_and_max_value_it_should_generate_that_number() => ARandom.DoubleBetween(1.0001, 1.0001).Should().Be(1.0001);
public void should_accept_min_and_max_values() => ARandom.DoubleBetween(double.MinValue, double.MaxValue).Should().BeGreaterOrEqualTo(double.MinValue);
public void should_fail_if_min_is_greater_than_max() => Catch.Exception(() => ARandom.DoubleBetween(1.0001, 0)).Should().BeOfType <ArgumentException>();
public void should_accept_a_very_high_min_value() => ARandom.DoubleBetween(double.MaxValue - double.Epsilon, double.MaxValue).Should().BeGreaterOrEqualTo(double.MaxValue - double.Epsilon);
public void should_accept_a_very_low_max_value() => ARandom.DoubleBetween(double.MinValue, double.MinValue + double.Epsilon).Should().BeLessOrEqualTo(double.MinValue + double.Epsilon);
public void should_accept_max_value_as_max() => ARandom.DoubleBetween(0, double.MaxValue).Should().BeLessOrEqualTo(double.MaxValue);
public void should_accept_min_value_as_min() => ARandom.DoubleBetween(double.MinValue, 15).Should().BeGreaterOrEqualTo(double.MinValue);
public void when_given_that_same_min_and_max_value_it_should_generate_that_number() => ARandom.DoubleBetween(15, 15).Should().BeLessOrEqualTo(15);
public void should_generate_value_less_than_or_equal_to_max_value() => ARandom.DoubleBetween(0, double.Epsilon).Should().BeLessOrEqualTo(double.Epsilon);
public void should_generate_value_greater_than_or_equal_to_min_value() => ARandom.DoubleBetween(0, double.Epsilon).Should().BeGreaterOrEqualTo(0);