oyachai/HearthSim

What is the difference between Groovy tests and non-Groovy tests?

Closed this issue · 2 comments

Do we need both patterns? It looks like they are testing the exact same thing:

https://github.com/oyachai/HearthSim/blob/master/src/test/groovy/com/hearthsim/test/groovy/card/ElvenArcherSpec.groovy

https://github.com/oyachai/HearthSim/blob/master/src/test/java/com/hearthsim/test/minion/TestElvenArcher.java

I've been trimming out a ton of duplicated test code in the Java tests but don't get why we need both of these.

The .java junit tests are the legacy tests. A couple of months ago, we switched over to groovy + spock for testing, and all the new test cases are being written using spock. We just haven't gotten around to converting the legacy test cases yet.

Ah, okay. I'll slowly start hacking away at those too, I guess. I'm more comfortable with java/junit than groovy/spock but looking at the tests they don't seem that hard to convert.