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

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