public void AppStateShouldBeSetOnRepairClicked()
        {
            var router = new RoutingState();
            var kernel = new NSubstituteMockingKernel();
            IRoutableViewModel latestVm = null;

            var fixture = setupStandardFixture(router, kernel, () => {
                var branchInfo = new Dictionary<string, HeuristicTreeInformation>() {
                    { "Working Directory", new HeuristicTreeInformation("derp", true)}
                };

                kernel.Get<IRepoAnalysisProvider>().AnalyzeRepo(null)
                    .ReturnsForAnyArgs(Observable.Return(Tuple.Create("foo", branchInfo)));

                router.ViewModelObservable().Subscribe(x => latestVm = x);
            });

            fixture.AnalyzeRepo.Execute("foo");

            fixture.RepairButtonVisibility.ShouldEqual(Visibility.Visible);
            fixture.RepairButton.Execute(null);

            var result = kernel.Get<IAppState>();

            (latestVm is IRepairViewModel).ShouldBeTrue();
            result.CurrentRepo.ShouldEqual("foo");
            result.BranchInformation.ShouldNotBeNull();
        }
        public void AppStateShouldBeSetOnRepairClicked()
        {
            var router = new RoutingState();
            var kernel = new NSubstituteMockingKernel();
            IRoutableViewModel latestVm = null;

            var fixture = setupStandardFixture(router, kernel, () => {
                var branchInfo = new Dictionary <string, HeuristicTreeInformation>()
                {
                    { "Working Directory", new HeuristicTreeInformation("derp", true) }
                };

                kernel.Get <IRepoAnalysisProvider>().AnalyzeRepo(null)
                .ReturnsForAnyArgs(Observable.Return(Tuple.Create("foo", branchInfo)));

                router.ViewModelObservable().Subscribe(x => latestVm = x);
            });

            fixture.AnalyzeRepo.Execute("foo");

            fixture.RepairButtonVisibility.ShouldEqual(Visibility.Visible);
            fixture.RepairButton.Execute(null);

            var result = kernel.Get <IAppState>();

            (latestVm is IRepairViewModel).ShouldBeTrue();
            result.CurrentRepo.ShouldEqual("foo");
            result.BranchInformation.ShouldNotBeNull();
        }