Unit Testing Anti-Pattern: Code Matching
Sometimes, tests imitate code, and not in a good way. Here’s our tested code: public String encode(String word) { String result = word + word.length(); return result; } And here’s our test: @Test public void howItsDone() { Encoder enc = Read more…