Posted by Sébastien Lachance with Comments (0)
Very common scenario. There is probably a better way to do this, but this one get the job done.
var mockedView = MockRepository.GenerateMock<ICustomerView>(); mockedView.Expect(v=>v.Save += null).IgnoreArguments(); mockedView.Expect(v=>v.Delete += null).IgnoreArguments(); mockedView.Expect(v=>v.Load += null).IgnoreArguments(); new CustomerPresenter(mockedView); //Subscribtion to events mockedView.VerifyAllExpectations();
Related posts