public Product Product() { return(new Product { Id = GetUniqueId(), Name = ARandom.Title(30), Description = ARandom.Text(200) }); }
public void should_generate_a_string_of_up_to_the_specified_size_string(int length) { ARandom.Title(length).Length.Should().BeInRange(1, length); }
public void should_not_allow_max_chars_less_than_1() { Action randomTitleOfZero = () => { ARandom.Title(0); }; randomTitleOfZero.ShouldThrow <ArgumentOutOfRangeException>(); }
public void should_return_a_nonempty_string() { ARandom.Title(100).Should().NotBeEmpty(); }
protected override void SetupDefaultValues() { SetProperty(x => x.Id, GenerateNewId()); SetProperty(x => x.Name, ARandom.Title(100)); SetProperty(x => x.Description, ARandom.Text(200)); }