[General boards] [Winter 2019 courses] [Fall 2018 courses] [Summer 2018 courses] [Older or newer terms]

Should we mock the entities array from FishTank class if we use it in a test?


#1

Should we mock the entities array from FishTank class if we use it in a test?


#2

It’s not very trivial to mock a static field, unfortunately. Ideally you would, but for the purposes of A2, just making a “resetTank()” method that clears it is probably fine for the purposes of writing unit tests.