Esempio n. 1
0
 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();
 }
Esempio n. 2
0
        public void LoadIndexView(Nullable <Guid> selectPackageId = null)
        {
            var packages = this.GetAllPackages();

            _threadDispatcher.Dispatch(() => _views.IndexView.Initialize(packages, selectPackageId));
        }
Esempio n. 3
0
 public void Handle(PackageAddedEvent e)
 {
     _dispatcher.Dispatch(() => _router.GoTo(new PackageIndexRoute()));
 }
Esempio n. 4
0
 public void Handle(PackageIndexRoute route)
 {
     _controller.LoadIndexView();
     _dispatcher.Dispatch(() => _main.Display(_controller.Views.IndexView));
 }