feat: Finish ReplaceChar
All checks were successful
Tests / Unit Testing1 (push) Successful in 46s

This commit is contained in:
2023-11-02 17:48:44 +01:00
parent 3f42af8215
commit 1a5351d121
2 changed files with 19 additions and 1 deletions

View File

@ -35,4 +35,14 @@ public class IterationTests
string actual = Iteration.Iterations.FirstUpper(s);
Assert.Equal(expected, actual);
}
[Theory]
[InlineData("De la programmation avant toute chose.", 'a', '*', "De l* progr*mm*tion *v*nt toute chose.")]
[InlineData("De la programmation avant toute chose.", 'a', '!', "De l! progr!mm!tion !v!nt toute chose.")]
public void ReplaceTest(string s, char old, char next, string expected)
{
string actual = Iteration.Iterations.ReplaceChar(s, old, next);
Assert.Equal(expected, actual);
}
}