public void TestInitialize() { _mockMainView = Substitute.For <IViewMain>(); _mockController = new PackageControllerMockBundle().MockController; _mockDispatcher = Substitute.For <IThreadDispatcher>(); _mockDispatcher.Dispatch(Arg.Invoke()); _handler = new PackageIndexRouteHandler(_mockDispatcher, _mockMainView, _mockController); _package = new PackageDto(Guid.NewGuid()); _route = new PackageIndexRoute(); }
public void LoadIndexView(Nullable <Guid> selectPackageId = null) { var packages = this.GetAllPackages(); _threadDispatcher.Dispatch(() => _views.IndexView.Initialize(packages, selectPackageId)); }
public void Handle(PackageAddedEvent e) { _dispatcher.Dispatch(() => _router.GoTo(new PackageIndexRoute())); }
public void Handle(PackageIndexRoute route) { _controller.LoadIndexView(); _dispatcher.Dispatch(() => _main.Display(_controller.Views.IndexView)); }