public void Setup() { _mockView = MockHelper.CreateNew <IRedirectionManagerView>(); _mockView.Setup(v => v.Model).Returns(new RedirectionManagerViewModel()); _mockController = MockHelper.CreateNew <IRedirectionController>(); _mockController.Setup(c => c.GetRedirectionById(It.IsAny <int>(), It.IsAny <int>())).Returns <int, int>(GetRedirectionByIdCallback); _mockController.Setup(c => c.GetRedirectionsByPortal(It.IsAny <int>())).Returns <int>(GetRedirectionsByPortalCallback); _mockController.Setup(c => c.Save(It.IsAny <IRedirection>())).Callback <IRedirection>(SaveCallback); _mockController.Setup(c => c.Delete(It.IsAny <int>(), It.IsAny <int>())).Callback <int, int>(DeleteCallback); CreatePresenter(); }