Frage im Vorstellungsgespräch bei N26

How would you test a singleton?

Antworten zu Vorstellungsgespräch

Anonym

15. Nov. 2016

I would not want to test "a singleton", before you want to cover something with tests - you need to understand what it is and why does it need to be tested. 100 percent test coverage of anything is just an OCD symptom.

Anonym

19. Apr. 2019

Singletons are regular classes with the singleton part on top. So test it as a regular class.