From 81cdd14e8d647d24ea83b66db77bd94b9dd95447 Mon Sep 17 00:00:00 2001 From: tschumpr Date: Tue, 28 May 2024 14:17:37 +0200 Subject: [PATCH] Rename Operate to Mandates --- src/Geopilot.Api/ContextExtensions.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Geopilot.Api/ContextExtensions.cs b/src/Geopilot.Api/ContextExtensions.cs index 40f6f100..d59c61b9 100644 --- a/src/Geopilot.Api/ContextExtensions.cs +++ b/src/Geopilot.Api/ContextExtensions.cs @@ -60,7 +60,7 @@ public static void SeedTestData(this Context context) context.SeedUsers(); context.SeedOrganisations(); - context.SeedOperate(); + context.SeedMandates(); context.SeedDeliveries(); context.SeedAssets(); context.AuthorizeFirstUser(); @@ -119,10 +119,10 @@ public static Geometry GetExtent() }); } - public static void SeedOperate(this Context context) + public static void SeedMandates(this Context context) { var knownFileFormats = new string[] { ".xtf", ".gpkg", ".*", ".itf", ".xml", ".zip", ".csv" }; - var operateFaker = new Faker() + var mandateFaker = new Faker() .StrictMode(true) .RuleFor(o => o.Id, f => 0) .RuleFor(o => o.Name, f => f.Commerce.ProductName()) @@ -131,8 +131,8 @@ public static void SeedOperate(this Context context) .RuleFor(o => o.Organisations, f => f.PickRandom(context.Organisations.ToList(), 1).ToList()) .RuleFor(o => o.Deliveries, _ => new List()); - Mandate SeedOperat(int seed) => operateFaker.UseSeed(seed).Generate(); - context.Mandates.AddRange(Enumerable.Range(0, 10).Select(SeedOperat)); + Mandate SeedMandate(int seed) => mandateFaker.UseSeed(seed).Generate(); + context.Mandates.AddRange(Enumerable.Range(0, 10).Select(SeedMandate)); context.SaveChanges(); }