public void can_get_random_currency() { var cur = finance.Currency(); cur.Description.Should().Be("Nepalese Rupee"); cur.Code.Should().Be("NPR"); cur.Symbol.Should().NotBeNullOrWhiteSpace(); }
static WordFunctions() { var commerce = new Commerce(); var company = new Company(); var address = new Address(); var finance = new Finance(); var hacker = new Hacker(); var name = new Name(); Functions.Add(() => commerce.Department()); Functions.Add(() => commerce.ProductName()); Functions.Add(() => commerce.ProductAdjective()); Functions.Add(() => commerce.ProductMaterial()); Functions.Add(() => commerce.ProductName()); Functions.Add(() => commerce.Color()); Functions.Add(() => company.CatchPhraseAdjective()); Functions.Add(() => company.CatchPhraseDescriptor()); Functions.Add(() => company.CatchPhraseNoun()); Functions.Add(() => company.BsAdjective()); Functions.Add(() => company.BsBuzz()); Functions.Add(() => company.BsNoun()); Functions.Add(() => address.StreetSuffix()); Functions.Add(() => address.County()); Functions.Add(() => address.Country()); Functions.Add(() => address.State()); Functions.Add(() => address.StreetSuffix()); Functions.Add(() => finance.AccountName()); Functions.Add(() => finance.TransactionType()); Functions.Add(() => finance.Currency().Description); Functions.Add(() => hacker.Noun()); Functions.Add(() => hacker.Verb()); Functions.Add(() => hacker.Adjective()); Functions.Add(() => hacker.IngVerb()); Functions.Add(() => hacker.Abbreviation()); Functions.Add(() => name.JobDescriptor()); Functions.Add(() => name.JobArea()); Functions.Add(() => name.JobType()); }
public static void Seed(IApplicationBuilder applicationBuilder) { using (var serviceScope = applicationBuilder.ApplicationServices.CreateScope()) { var context = serviceScope.ServiceProvider.GetService <WarehouseDbContext>(); if (context.Product.Any()) { return; } var commerce = new Commerce(); var finance = new Finance(); var lorem = new Lorem(); var company = new Company(); var internet = new Internet(); var name = new Name(); var rant = new Rant(); for (var i = 0; i < 100000; i++) { context.Product.Add(new Product { Category = commerce.Categories(1)[0], Color = commerce.Color(), Ean13 = commerce.Ean13(), Name = commerce.ProductName(), Price = decimal.Parse(commerce.Price()), Currency = finance.Currency().Code, Description = lorem.Sentences(), Company = company.CompanyName(), Mail = internet.Email(), Seller = name.FullName(), Review = rant.Review() }); } context.SaveChanges(); } }
public static Bogus.DataSets.Currency Currency(System.Boolean includeFundCodes) => Finance.Currency(includeFundCodes);
public static Currency Currency(System.Boolean includeFundCodes) => Finance.Currency(includeFundCodes);