コード例 #1
0
        public SupportPage()
        {
            InitializeComponent();

            MessagingCenter.Subscribe <string>(this, "ScrollToEnd", (sender) =>
            {
                var v = supportChat.ItemsSource.Cast <object>().LastOrDefault();
                if (v != null)
                {
                    supportChat.ScrollTo(v, null, ScrollToPosition.End, true);
                }
            });
            IsSubscribe          = true;
            SupportPageViewModel = this.BindingContext as SupportPageViewModel;
        }
コード例 #2
0
        public async Task SupportTab_ShouldCheckIfTheDataHasBeenLoaded_Pass()
        {
            //Arrange
            var authenticationFacade = container.Resolve <IAuthenticationFacade>();
            var dialogService        = container.Resolve <IPageDialogService>();

            //Act
            var supportPageViewModel = new SupportPageViewModel(dialogService, authenticationFacade);

            await Task.Delay(2000);

            //Assert
            Assert.Equal(supportPageViewModel.Title, "Support Page");
            Assert.Equal(supportPageViewModel.FAQItems.Count, 5);
            Assert.Equal(supportPageViewModel.FAQSections.Count, 9);
        }