Beispiel #1
0
        public void VerifyRoutesAreDisplayed()
        {
            int DisplayedRowCount = Int32.Parse(RowCount.Text);

            //Verify that the Row Count displayed above the Routes table shows a value greater than 1
            DisplayedRowCount.Should().BeGreaterOrEqualTo(1);

            //Verify that more than 1 row is in the Routes table
            int NumberOfRowsInRoutesTable = RoutesTable.FindElements(By.TagName("tr")).Count;

            //Verify the the number of rows in the Routes table is at least 2 because the
            NumberOfRowsInRoutesTable.Should().BeGreaterOrEqualTo(2);
        }
Beispiel #2
0
        void ReleaseDesignerOutlets()
        {
            if (RoutesTable != null)
            {
                RoutesTable.Dispose();
                RoutesTable = null;
            }

            if (StationsButton != null)
            {
                StationsButton.Dispose();
                StationsButton = null;
            }
        }
Beispiel #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            NavigationItem.Title = "Routes";

            var source = new MvxSimpleTableViewSource(RoutesTable, RouteCell.Key, RouteCell.Key);

            RoutesTable.Source = source;

            var bindingSet = this.CreateBindingSet <RoutesView, RoutesViewModel>();

            bindingSet.Bind(StationsButton).To(vm => vm.NavigateToStationsCommand);
            bindingSet.Bind(source).To(vm => vm.RouteList);
            bindingSet.Bind(source).For(s => s.SelectedItem).To(vm => vm.SelectedRoute);
            bindingSet.Bind(source).For(s => s.SelectionChangedCommand).To(vm => vm.NavigateToFilteredStationsCommand);

            bindingSet.Apply();

            RoutesTable.ReloadData();

            RoutesViewModel.FinishNotificationEvent += OnFinishFetchData;
        }
Beispiel #4
0
        private async void OnFinishFetchData(object sender, EventArgs eventArgs)
        {
            await Task.Delay(250);

            RoutesTable.ReloadData();
        }