public void Setup()
 {
     _invoker                               = Substitute.For <IInteractionInvoker>();
     _translator                            = Substitute.For <ITranslator>();
     _dropboxActionViewModel                = new DropboxActionViewModel(_translator, _invoker);
     _dropboxActionViewModel.Accounts       = new Accounts();
     _dropboxActionViewModel.CurrentProfile = new ConversionProfile();
     _invoker.When(x => x.Invoke(Arg.Any <DropboxInteraction>())).Do(info =>
     {
         info.Arg <DropboxInteraction>().AccessToken = AccessToken;
         info.Arg <DropboxInteraction>().AccountId   = AccountID;
         info.Arg <DropboxInteraction>().AccountInfo = AccountInfo;
         info.Arg <DropboxInteraction>().Success     = true;
     });
 }
        public void Setup()
        {
            _invoker        = Substitute.For <IInteractionInvoker>();
            _dropboxService = Substitute.For <IDropboxService>();

            _dropboxActionViewModel                = new DropboxActionViewModel(new DropboxSettingsAndActionTranslation(), _invoker, _dropboxService, new TokenHelper(new TokenPlaceHoldersTranslation()));
            _dropboxActionViewModel.Accounts       = new Accounts();
            _dropboxActionViewModel.CurrentProfile = new ConversionProfile();
            _invoker.When(x => x.Invoke(Arg.Any <DropboxInteraction>())).Do(info =>
            {
                info.Arg <DropboxInteraction>().AccessToken = AccessToken;
                info.Arg <DropboxInteraction>().AccountId   = AccountID;
                info.Arg <DropboxInteraction>().AccountInfo = AccountInfo;
                info.Arg <DropboxInteraction>().Success     = true;
            });
        }
Ejemplo n.º 3
0
 public DropboxActionControl(DropboxActionViewModel dropboxActionViewModel) : base(dropboxActionViewModel)
 {
     InitializeComponent();
 }
 public DropboxActionControl(DropboxActionViewModel dropboxActionViewModel, ITranslator translator) : base(dropboxActionViewModel)
 {
     InitializeComponent();
     translator.Translate(this);
 }