There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Why my mocked view reference is replaced when creating a unit test?
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???