-
-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d446b2
commit a7d9aa8
Showing
3 changed files
with
82 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Generators.Exercises | ||
{ | ||
public class PigLatinExercise : Exercise | ||
{ | ||
public PigLatinExercise() : base("pig-latin") | ||
{ | ||
} | ||
|
||
protected override TestMethod CreateTestMethod(TestMethodData testMethodData) | ||
=> CreateEqualityTestMethod(testMethodData); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
using System.Text.RegularExpressions; | ||
using Humanizer; | ||
|
||
namespace Generators | ||
{ | ||
public class TestedClassNameTransformer : IStringTransformer | ||
{ | ||
public string Transform(string input) | ||
=> Regex.Replace(input, @"[^\w]+", "", RegexOptions.Compiled).Underscore().Transform(Humanizer.To.TitleCase); | ||
public string Transform(string input) => input.Dehumanize(); | ||
} | ||
} |