Пример #1
0
 public LineItem LineItem()
 {
     return(new LineItem
     {
         Id = GetUniqueId(),
         Order = Order(),
         Product = Product(),
         Quantity = ARandom.IntBetween(1, 10),
         UnitPrice = ARandom.DoubleBetween(1, 100)
     });
 }
Пример #2
0
 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);
Пример #3
0
 public void should_accept_min_and_max_values() =>
 ARandom.DoubleBetween(double.MinValue, double.MaxValue).Should().BeGreaterOrEqualTo(double.MinValue);
Пример #4
0
 public void should_fail_if_min_is_greater_than_max() =>
 Catch.Exception(() => ARandom.DoubleBetween(1.0001, 0)).Should().BeOfType <ArgumentException>();
Пример #5
0
 public void should_accept_a_very_high_min_value() =>
 ARandom.DoubleBetween(double.MaxValue - double.Epsilon, double.MaxValue).Should().BeGreaterOrEqualTo(double.MaxValue - double.Epsilon);
Пример #6
0
 public void should_accept_a_very_low_max_value() =>
 ARandom.DoubleBetween(double.MinValue, double.MinValue + double.Epsilon).Should().BeLessOrEqualTo(double.MinValue + double.Epsilon);
Пример #7
0
 public void should_accept_max_value_as_max() =>
 ARandom.DoubleBetween(0, double.MaxValue).Should().BeLessOrEqualTo(double.MaxValue);
Пример #8
0
 public void should_accept_min_value_as_min() =>
 ARandom.DoubleBetween(double.MinValue, 15).Should().BeGreaterOrEqualTo(double.MinValue);
Пример #9
0
 public void when_given_that_same_min_and_max_value_it_should_generate_that_number() =>
 ARandom.DoubleBetween(15, 15).Should().BeLessOrEqualTo(15);
Пример #10
0
 public void should_generate_value_less_than_or_equal_to_max_value() =>
 ARandom.DoubleBetween(0, double.Epsilon).Should().BeLessOrEqualTo(double.Epsilon);
Пример #11
0
 public void should_generate_value_greater_than_or_equal_to_min_value() =>
 ARandom.DoubleBetween(0, double.Epsilon).Should().BeGreaterOrEqualTo(0);