public void SetUp() { modelMock = new DynamicMock(typeof(ILoadImageModel)) { Strict = true }; model = modelMock.MockInstance as ILoadImageModel; imageListChangedConstraint = new SavedTypeOf(typeof(EventDelegate)); modelMock.Expect("SubscribeImageListChanged", imageListChangedConstraint); startConstraint = new SavedTypeOf(typeof(EventDelegate)); modelMock.Expect("SubscribeStart", startConstraint); finishConstraint = new SavedTypeOf(typeof(EventDelegate)); modelMock.Expect("SubscribeFinish", finishConstraint); viewMock = new DynamicMock(typeof(ILoadImageView)) { Strict = true }; view = viewMock.MockInstance as ILoadImageView; loadCommandConstraint = new SavedTypeOf(typeof(EventDelegate)); viewMock.Expect("SubscribeLoadCommand", loadCommandConstraint); new LoadImagePresenter(model, view); }
public void SetUp() { modelMock = new DynamicMock(typeof(IPuzzleModel)); modelMock.Strict = true; model = modelMock.MockInstance as IPuzzleModel; updateImagesConstraint = new SavedTypeOf(typeof(EventDelegate)); modelMock.Expect("SubscribeUpdateImages", updateImagesConstraint); // Setup the view viewMock = new DynamicMock(typeof(IPuzzleView)); viewMock.Strict = true; view = viewMock.MockInstance as IPuzzleView; moveRequestConstraint = new SavedTypeOf(typeof(PointDelegate)); viewMock.Expect("SubscribeMoveRequest", moveRequestConstraint); loadImageRequestConstraint = new SavedTypeOf(typeof(EventDelegate)); viewMock.Expect("SubscribeLoadImageRequest", loadImageRequestConstraint); // create the presenter new PuzzlePresenter(model, view); }