public void Setup() { _interactionInvoker = Substitute.For <IInteractionInvoker>(); _directoryHelper = Substitute.For <IDirectoryHelper>(); _someFilePath = Path.Combine(_someDirectory, _someFile); _translation = new InteractiveWorkflowTranslation(); }
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>()); }
private void UpdateTranslation(ITranslationFactory translationFactory) { translation = translationFactory.CreateTranslation <InteractiveWorkflowTranslation>(); }
public InteractiveFileNameQuery(InteractiveWorkflowTranslation translation, IInteractionInvoker interactionInvoker, IOutputFilenameComposer outputFilenameComposer) { _translation = translation; _interactionInvoker = interactionInvoker; _outputFilenameComposer = outputFilenameComposer; }
public InteractiveFtpPasswordProvider(IInteractionInvoker interactionInvoker, InteractiveWorkflowTranslation translation) { _interactionInvoker = interactionInvoker; _translation = translation; }