Esempio n. 1
0
        public async Task TestComments()
        {
            // Test that the comment values are mapped correctly from the viewModel we pass in
            var posts            = MockFacebook.GetPosts();
            var viewModel        = new FacebookCardViewModel(posts[0]);
            var commentViewModel = new CommentViewModel(viewModel);

            await commentViewModel.DidLoad();

            // We do (+2) because there are always two additional more, the primary comment card and the "Now" header
            Assert.AreEqual(viewModel, commentViewModel.PrimaryCardViewModel);
            Assert.AreEqual(viewModel.CommentViewModels.Count + 2, commentViewModel.CardViewModels.Count);
        }
Esempio n. 2
0
        private async void OnRequestCommentPage(CommentViewModel cVm)
        {
            await cVm.DidLoad();

            _navigationService.NavigateTo(ViewModelLocator.COMMENT_KEY, cVm);
        }