This project is read-only.
1
Vote

Why my mocked view reference is replaced when creating a unit test?

description

Hi dudes,
first of all .. good job. I have a simple question. I am creating a unit test and i have the following code there:
this.model = new AboutModel();
this.view = new AboutViewMock();
this.view.Model = this.model;
// Here when i call this.view.Model == this.model return TRUE
this.presenter = new AboutPresenter(view);
// Here when i call this.view.Model == this.model return FALSE

So my question is .. what a framework will REPLACE my model's reference with a new one and WHY??? ... what if i have set up my model for the test ... after creating the presenter my setup has gone away???

comments