Exercise 2 Task 2.1 - Refactoring

Moderatoren: pmueller, SE - Design and Construction

Mario Trageser
Windoof-User
Windoof-User
Beiträge: 40
Registriert: 20. Jul 2013 14:28

Exercise 2 Task 2.1 - Refactoring

Beitrag von Mario Trageser »

Hi,

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.

Kind regards,
Mario

eichberg
Moderator
Moderator
Beiträge: 448
Registriert: 25. Sep 2007 12:12
Kontaktdaten:

Re: Exercise 2 Task 2.1 - Refactoring

Beitrag von eichberg »

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.

Antworten

Zurück zu „Software Engineering - Design and Construction“