public void TextFakerTest() { DisplayAndExecute(new Expression <Func <string> >[] { () => TextFaker.Sentence(), () => TextFaker.Sentences(4), }); }
private Article CreateRandomArticle() { var result = new Article(); result.Body = TextFaker.Sentences(NumberFaker.Number()); result.Description = TextFaker.Sentence(); result.Id = NumberFaker.Number().ToString(); result.Title = TextFaker.Sentence(); return(result); }
public IEnumerable <Article> GetArticles() { var result = new Article(); result.Body = TextFaker.Sentences(NumberFaker.Number()); result.Description = TextFaker.Sentence(); result.Id = NumberFaker.Number().ToString(); result.Title = TextFaker.Sentence(); List <Article> list = new List <Article>(); for (var i = 0; i < 100; i++) { list.Add(CreateRandomArticle()); } return(list); }
public void SetUp() { converter = new CustomerConverter(); fakeEntity = new Customer { Id = NumberFaker.Number(1, int.MaxValue), Name = StringFaker.Alpha(25), StreetAddress = new Address { Address1 = LocationFaker.Street(), Address2 = LocationFaker.Street(), City = LocationFaker.City(), State = StringFaker.Alpha(2), PostalCode = LocationFaker.PostCode(), Country = LocationFaker.Country() }, BillingAddress = new Address { Address1 = LocationFaker.Street(), Address2 = LocationFaker.Street(), City = LocationFaker.City(), State = StringFaker.Alpha(2), PostalCode = LocationFaker.PostCode(), Country = LocationFaker.Country() }, OfficePhone1 = PhoneFaker.Phone(), OfficePhone2 = PhoneFaker.Phone(), OfficeFax = PhoneFaker.Phone(), Email = InternetFaker.Email(), PrimaryContact = new HumanContact { FirstName = NameFaker.FirstName(), LastName = NameFaker.LastName(), Email = InternetFaker.Email(), Fax = PhoneFaker.Phone(), Phone1 = PhoneFaker.Phone(), Phone2 = PhoneFaker.Phone(), Notes = TextFaker.Sentence() }, Notes = TextFaker.Sentences(5) }; fakeViewModel = new CustomerViewModel { Id = NumberFaker.Number(1, int.MaxValue), Name = StringFaker.Alpha(25), CanLicensePreReleaseVersions = BooleanFaker.Boolean(), StreetAddress = new Address { Address1 = LocationFaker.Street(), Address2 = LocationFaker.Street(), City = LocationFaker.City(), State = StringFaker.Alpha(2), PostalCode = LocationFaker.PostCode(), Country = LocationFaker.Country() }, BillingMatchesStreetAddress = BooleanFaker.Boolean(), BillingAddress = new Address { Address1 = LocationFaker.Street(), Address2 = LocationFaker.Street(), City = LocationFaker.City(), State = StringFaker.Alpha(2), PostalCode = LocationFaker.PostCode(), Country = LocationFaker.Country() }, OfficePhone1 = PhoneFaker.Phone(), OfficePhone2 = PhoneFaker.Phone(), OfficeFax = PhoneFaker.Phone(), Email = InternetFaker.Email(), PrimaryContact = new HumanContact { FirstName = NameFaker.FirstName(), LastName = NameFaker.LastName(), Email = InternetFaker.Email(), Fax = PhoneFaker.Phone(), Phone1 = PhoneFaker.Phone(), Phone2 = PhoneFaker.Phone(), Notes = TextFaker.Sentence() }, Notes = TextFaker.Sentences(5) }; }
/// <summary> /// Fakes the sentence. /// </summary> /// <returns></returns> public string FakeSentence() { return(TextFaker.Sentence()); }