Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modify(string value)
- {
- if(value.Length > 5) replaceit(value);
- else changeit(value);
- }
- public TestModifyIfValueLength..()
- {
- string expectedValue = .. ;// literal result of replaceit(value)
- Assert.Equals( expectedValue, modify("asd") );
- }
- testLongValue() {
- string testValue = "A value longer than 5 chars";
- string expected = "Replaced!";
- string actual = modify(testValue);
- assertEqual(expected, actual);
- }
- testShortValue() {
- string testValue = "len4";
- string expected = "Changed!";
- string actual = modify(testValue);
- assertEqual(expected, actual);
- }
Add Comment
Please, Sign In to add comment