Skip to content

Commit 7c92201

Browse files
committed
Fixed edge case failure in Names fixtures
1 parent 8bb0e6c commit 7c92201

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.

tests/Faker.Tests/NameFixture.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public static void SetUp()
1717
var suffixes = string.Join("|", Resources.Name.Suffix.Split(Config.Separator)
1818
.Select(x => $"(( {x})?)"));
1919

20-
var fullNameRegExString = $@"({prefixes})(\w+?) (\w+\'?)(\w+?\-?\w+)({suffixes})";
21-
var fullNameWithMiddleRegExString = $@"({prefixes})(\w+?) (\w+\'?) (\w+\'?)(\w+?\-?\w+)({suffixes})";
20+
var fullNameRegExString = $@"({prefixes})(\w+?) (\w\'?)(\w+?\-?\w+)({suffixes})";
21+
var fullNameWithMiddleRegExString = $@"({prefixes})(\w+?) (\w\'?)(\w+\'?) (\w\'?)(\w+?\-?\w+)({suffixes})";
2222

2323
_fullNameRegex = new Regex(fullNameRegExString, RegexOptions.Compiled);
2424
_fullNameWithMiddleRegex = new Regex(fullNameWithMiddleRegExString, RegexOptions.Compiled);
@@ -30,7 +30,7 @@ public static void SetUp()
3030
[Test]
3131
public void Should_Get_FullName()
3232
{
33-
for (var i = 0; i < 99; i++)
33+
for (var i = 0; i < 999; i++)
3434
{
3535
var name = Name.FullName();
3636
Console.WriteLine($@"Iteration=[{i}], Name=[{name}]");

0 commit comments

Comments
 (0)