From e29cd12efa1c94da4755255276485d199e25e3a9 Mon Sep 17 00:00:00 2001 From: Renato Lima Date: Sat, 31 Dec 2022 01:13:28 -0300 Subject: [PATCH] Fix BrazilianPhoneNumber extension --- src/Mockaco.AspNetCore/Plugins/PhoneNumberExtensions.cs | 3 +-- src/Mockaco.AspNetCore/PublicAPI.Unshipped.txt | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mockaco.AspNetCore/Plugins/PhoneNumberExtensions.cs b/src/Mockaco.AspNetCore/Plugins/PhoneNumberExtensions.cs index f4b01a4..4d7a19d 100644 --- a/src/Mockaco.AspNetCore/Plugins/PhoneNumberExtensions.cs +++ b/src/Mockaco.AspNetCore/Plugins/PhoneNumberExtensions.cs @@ -3,7 +3,7 @@ namespace Bogus { // TODO Move to plugin - internal static class PhoneNumberExtensions + public static class PhoneNumberExtensions { public static string BrazilianPhoneNumber(this PhoneNumbers phoneNumbers) { @@ -11,7 +11,6 @@ public static string BrazilianPhoneNumber(this PhoneNumbers phoneNumbers) string[] brazilianAreaCodes = { "11", "12", "13", "14", "15", "16", "17", "18", "19", "21", "22", "24", "27", "28", "31", "32", "33", "34", "35", "37", "38", "41", "42", "43", "44", "45", "46", "47", "48", "49", "51", "53", "54", "55", "61", "62", "63", "64", "65", "66", "67", "68", "69", "71", "73", "74", "75", "77", "79", "81", "82", "83", "84", "85", "86", "87", "88", "89", "91", "92", "93", "94", "95", "96", "97", "98", "99" }; var areaCode = faker.PickRandom(brazilianAreaCodes); var sufix = faker.Random.Number(50000000, 99999999); - return $"{areaCode}9{sufix}"; } } diff --git a/src/Mockaco.AspNetCore/PublicAPI.Unshipped.txt b/src/Mockaco.AspNetCore/PublicAPI.Unshipped.txt index 9952890..539725c 100644 --- a/src/Mockaco.AspNetCore/PublicAPI.Unshipped.txt +++ b/src/Mockaco.AspNetCore/PublicAPI.Unshipped.txt @@ -1,4 +1,5 @@ -Microsoft.AspNetCore.Builder.MockacoApplicationBuilder +Bogus.PhoneNumberExtensions +Microsoft.AspNetCore.Builder.MockacoApplicationBuilder Microsoft.Extensions.DependencyInjection.MockacoServiceCollection Mockaco.IFakerFactory Mockaco.IFakerFactory.GetDefaultFaker() -> Bogus.Faker @@ -102,6 +103,7 @@ Mockaco.TemplateFileProviderOptions.Path.get -> string Mockaco.TemplateFileProviderOptions.Path.set -> void Mockaco.TemplateFileProviderOptions.TemplateFileProviderOptions() -> void override Mockaco.Mock.ToString() -> string +static Bogus.PhoneNumberExtensions.BrazilianPhoneNumber(this Bogus.DataSets.PhoneNumbers phoneNumbers) -> string static Microsoft.AspNetCore.Builder.MockacoApplicationBuilder.UseMockaco(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) -> Microsoft.AspNetCore.Builder.IApplicationBuilder static Microsoft.AspNetCore.Builder.MockacoApplicationBuilder.UseMockaco(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Action configure) -> Microsoft.AspNetCore.Builder.IApplicationBuilder static Microsoft.Extensions.DependencyInjection.MockacoServiceCollection.AddMockaco(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection