Skip to content

Commit

Permalink
Baby steps toward #100. Reducing statics without impact.
Browse files Browse the repository at this point in the history
  • Loading branch information
bchavez committed Nov 3, 2017
1 parent 216ab29 commit dec7a15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Source/Bogus/Extensions/ExtensionsForBrazil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static string Cpf(this Person p)
/// </summary>
public static string Cnpj(this Company c)
{
var digits = r.Digits(12);
var digits = c.Random.Digits(12);
digits[8] = 0;
digits[9] = 0;
digits[10] = 0;
Expand Down
5 changes: 2 additions & 3 deletions Source/Bogus/Extensions/ExtensionsForUnitedKingdom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ namespace Bogus.Extensions.UnitedKingdom
/// </summary>
public static class ExtensionsForUnitedKingdom
{
private static Randomizer r = new Randomizer();
/// <summary>
/// Banking Short Code
/// </summary>
Expand All @@ -18,10 +17,10 @@ public static string ShortCode(this Finance finance, bool includeSeperator = tru

if( includeSeperator )
{
return r.ReplaceNumbers(withSeperators);
return finance.Random.ReplaceNumbers(withSeperators);
}

return r.ReplaceNumbers(withoutSeperators);
return finance.Random.ReplaceNumbers(withoutSeperators);
}
}
}

0 comments on commit dec7a15

Please sign in to comment.