Пример #1
0
        public void CallFunctionalityInCorrectOrder()
        {
            var fileDialog = A.Fake <IFileDialog>();

            A.CallTo(() => fileDialog.ShowDialog()).Returns(FileDialogResult.Ok);
            A.CallTo(
                () => _fileDialogManager.CreateSaveFileDialog(
                    A <string> ._,
                    A <string> ._,
                    A <FileDialogFilter> ._,
                    A <string> ._,
                    A <string> ._)).Returns(fileDialog);

            _packAndGo.Run((_workbenchViewModel, false));

            A.CallTo(
                () => _fileDialogManager.CreateSaveFileDialog(
                    A <string> ._,
                    A <string> ._,
                    A <FileDialogFilter> ._,
                    A <string> ._,
                    A <string> ._)).MustHaveHappened(1, Times.Exactly)
            .Then(
                A.CallTo(() => _modelExporter.ExportSimulation(_projectContext, A <string> ._)).MustHaveHappened(1, Times.Exactly)).Then(
                A.CallTo(() => _gtfCopier.CopyTo(A <string> ._)).MustHaveHappened(1, Times.Exactly)).Then(
                A.CallTo(() => _batchCopier.CopyTo(A <string> ._)).MustHaveHappened(1, Times.Exactly)).Then(
                A.CallTo(() => _zipper.ZipTo(A <string> ._, A <string> ._)).MustHaveHappened(1, Times.Exactly));
        }