Seite 1 von 1
Exercise 2 Task 2.1 - Refactoring
Verfasst: 8. Nov 2017 15:00
shall we refactor the Context before writing the tests in Java?
Otherwise, we would need to ensure that the first test will be executed first, since other tests running before it would aquire the id 1.
Re: Exercise 2 Task 2.1 - Refactoring
Verfasst: 8. Nov 2017 15:13
You should write the tests for the existing class then refactor to Scala and then write tests for the Scala version.
The problem with the ordering is a typical problem when testing class which have a dependency on a global state. For the first task, you should find a solution for the given code at hand.