/// <summary>
        /// Creates a new weather dashboard page
        /// </summary>
        public WeatherDashboardPage()
        {
            this.Title = "Weather";

            this.InitializeComponent();

            this.BindingContext             = this.viewModel = new WeatherDashboardViewModel();
            this.viewModel.PropertyChanged += this.ViewModel_PropertyChanged;
        }
Esempio n. 2
0
        public void TestDefaultCtor()
        {
            // run
            var viewModel = new WeatherDashboardViewModel();

            Assert.IsTrue(
                viewModel.WaitForPropertyChange(
                    nameof(viewModel.WeatherDashboardItems),
                    TimeSpan.FromSeconds(10)),
                "waiting for property change must succeed");

            // check
            Assert.IsTrue(viewModel.WeatherDashboardItems.Any(), "weather icon list must contain placeholder icon");
        }