Пример #1
0
        public void view_profile_launched()
        {
            // Setup
            var viewModel = new ViewModel();
            var profileViewModel = new ManageProfile.ViewModel();

            // Test
            viewModel.ViewProfile.Execute(null);

            // Verify
            var expected = !string.IsNullOrEmpty(profileViewModel.Alias);
            Assert.IsTrue(expected);
        }
Пример #2
0
        public View()
        {
            InitializeComponent();

            _viewModel = this.BindingContext as ViewModel;

            _editorToLabel.Add(textBox1, label1);
            _editorToLabel.Add(textBox2, label2);
            _editorToLabel.Add(textBox3, label3);
            _editorToLabel.Add(textBox4, label4);

            // TODO Optimize matching entry to only be executed once.
            _messageBus.Subscribe(Messages.REQUEST_MATCHING_ENTRY, OnRequestMatchingEntry);
        }
Пример #3
0
        public void confirm_interaction_launched()
        {
            // Setup
            var viewModel = new ViewModel();
            var confirmationViewModel = new EngageObserver.Confirmation.ViewModel();
            var observer = new Core.Observer();
            Publish(CONFIRM_INTERACTION, observer);

            // Test
            viewModel.RequestConfirmation.Execute(null);

            // Verify
            var expected = confirmationViewModel.Observer == observer;
            Assert.IsTrue(expected);
        }
Пример #4
0
        public void compose_message_launched()
        {
            // Setup
            var viewModel = new ViewModel();
            var messageViewModel = new EngageObserver.Message.ViewModel();
            var observer = new Core.Observer();
            Publish(OBSERVER_TO_MESSAGE, observer);

            // Test
            viewModel.ComposeMessage.Execute(null);

            // Verify
            var expected = messageViewModel.Observer == observer;
            Assert.IsTrue(expected);
        }
Пример #5
0
 public ViewMenu()
 {
     InitializeComponent();
     _viewModel = this.DataContext as ViewModel;
 }