I'm writing a curse word censorship system in C# using TDD and as I am fairly new to implementing TDD, I'm wondering if there's an alternative or better way to accomplish the task of ensuring a return string does not contain the curse words and variations on it. Due to this being a public forum, I am replacing the actual curse words in the code with clean words, so assume I am trying to censor the cleaner versions just for this post please:
[TestMethod]
public void process_CensorCode_GivenJerkface_ReturnsStringWithoutJerkface()
{
//ACT
string result = proc.process("Jerkface you Jerkfacing Jerkfacer &*E@*Jerkface391!!", PROCESS_CODE.CENSOR);
//ASSERT
Assert.IsFalse(result.Contains("Jerkface"));
}
Obviously, my program also accounts for jerkface, jerKfAcE, jERKfaCe, etc.... and I want to test all of these. Do I need to write out a method for every single one of these variations in MSTest or is there some shortcut way to handle all of these variations in a single test? If you notice any other aspect of my test which could be improved, please also speak up. By the way, I have initialized with the following placed at the top of the TestClass:
[TestInitialize]
public void Initialize()
{
//ARRANGE
proc = new RegExProcessor();
}