Esempio n. 1
0
        public void OpenUriHelpCommandTest()
        {
            Assert.IsNull(this.viewModel.ConnectUri);

            MockUriHelpView view = Container.GetExportedValue <IUriHelpView>() as MockUriHelpView;

            view.ShowDialogAction = (x) =>
            {
                UriHelpViewModel uriHelpViewModel = x.GetViewModel <UriHelpViewModel>();
                uriHelpViewModel.CancelCommand.Execute(null);
            };
            this.viewModel.UriHelpCommand.Execute(null);
            Assert.IsNull(this.viewModel.ConnectUri);

            view.ShowDialogAction = (x) =>
            {
                UriHelpViewModel uriHelpViewModel = x.GetViewModel <UriHelpViewModel>();
                uriHelpViewModel.ServerName = TheCodePlexUri;
                uriHelpViewModel.SubmitCommand.Execute(null);
            };
            this.viewModel.UriHelpCommand.Execute(null);
            Assert.IsNotNull(this.viewModel.ConnectUri);
            Assert.AreEqual(
                new Uri(TheCodePlexUri).AbsoluteUri,
                this.viewModel.ConnectUri.AbsoluteUri);
        }
Esempio n. 2
0
        protected override void OnTestInitialize()
        {
            IUriHelpView view = Container.GetExportedValue <IUriHelpView>();

            this.viewModel = new UriHelpViewModel(view);
        }
Esempio n. 3
0
 protected override void OnTestInitialize()
 {
     IUriHelpView view = Container.GetExportedValue<IUriHelpView>();
     this.viewModel = new UriHelpViewModel(view);
 }