Beispiel #1
0
        protected override async Task Context()
        {
            await base.Context();

            _loadSnapshotPresenter = A.Fake <ILoadProjectFromSnapshotPresenter>();
            A.CallTo(() => _applicationController.Start <ILoadProjectFromSnapshotPresenter>()).Returns(_loadSnapshotPresenter);
            A.CallTo(() => _workspace.ProjectHasChanged).Returns(false);
            A.CallTo(() => _loadSnapshotPresenter.LoadProject()).Returns(null);
        }
Beispiel #2
0
        protected override async Task Context()
        {
            await base.Context();

            _newProject            = new PKSimProject();
            _loadSnapshotPresenter = A.Fake <ILoadProjectFromSnapshotPresenter>();
            A.CallTo(() => _applicationController.Start <ILoadProjectFromSnapshotPresenter>()).Returns(_loadSnapshotPresenter);

            A.CallTo(() => _loadSnapshotPresenter.LoadProject()).Returns(_newProject);
        }
Beispiel #3
0
        protected override async Task Context()
        {
            await base.Context();

            _loadSnapshotPresenter = A.Fake <ILoadProjectFromSnapshotPresenter>();
            A.CallTo(() => _applicationController.Start <ILoadProjectFromSnapshotPresenter>()).Returns(_loadSnapshotPresenter);
            A.CallTo(() => _workspace.ProjectHasChanged).Returns(true);
            A.CallTo(() => _dialogCreator.MessageBoxYesNoCancel(PKSimConstants.UI.SaveProjectChanges)).Returns(ViewResult.Cancel);
            A.CallTo(() => _loadSnapshotPresenter.LoadProject()).Returns(null);
        }