예제 #1
0
 public void Setup()
 {
     _interactionInvoker = Substitute.For <IInteractionInvoker>();
     _directoryHelper    = Substitute.For <IDirectoryHelper>();
     _someFilePath       = Path.Combine(_someDirectory, _someFile);
     _translation        = new InteractiveWorkflowTranslation();
 }
예제 #2
0
        public void RetypeFileName_NotifiesUser()
        {
            var translation = new InteractiveWorkflowTranslation();

            HandleMessageInteraction(interaction => interaction.Response = MessageResponse.OK);
            HandleSaveFileInteraction(interaction => interaction.Success = false);
            var query = BuildFileNameQuery();

            query.RetypeFileName(_someFile, OutputFormat.Pdf);

            _interactionInvoker.Received().Invoke(Arg.Is <MessageInteraction>(i => i.Text.Contains(translation.RetypeFilenameMessage)));
            _interactionInvoker.Received().Invoke(Arg.Any <SaveFileInteraction>());
        }
예제 #3
0
 private void UpdateTranslation(ITranslationFactory translationFactory)
 {
     translation = translationFactory.CreateTranslation <InteractiveWorkflowTranslation>();
 }
 public InteractiveFileNameQuery(InteractiveWorkflowTranslation translation, IInteractionInvoker interactionInvoker, IOutputFilenameComposer outputFilenameComposer)
 {
     _translation            = translation;
     _interactionInvoker     = interactionInvoker;
     _outputFilenameComposer = outputFilenameComposer;
 }
예제 #5
0
 public InteractiveFtpPasswordProvider(IInteractionInvoker interactionInvoker, InteractiveWorkflowTranslation translation)
 {
     _interactionInvoker = interactionInvoker;
     _translation        = translation;
 }