protected override void OnAppearing() { this.Username.Text = Settings.UserName; this.Password.Text = Settings.Password; this.UnsolicitedMessages.IsToggled = Settings.IgnoreUnsolicitedMessages; this.IgnoreVKs.IsToggled = Settings.IgnoreVKs; this.IgnoreGifts.IsToggled = Settings.IgnoreGifts; this.SearchFemales.IsToggled = Settings.SearchForFemales; this.PollingRate.Value = Settings.PollingRate; this.PollingRateLabel.Text = String.Format("Polling Rate {0:F0} minutes", Settings.PollingRate); this.FetchCount.Value = Settings.FetchCount; this.FetchCountLabel.Text = String.Format("Fetching {0:F0} users", Settings.FetchCount); Regions regions = new Regions(); if (Settings.SelectedRegions.Length > 0) { string regionList = ""; foreach (int regionId in Settings.SelectedRegions) { if (regionList.Length > 0) { regionList = regionList + ", "; } regionList = regionList + regions.CountyById(regionId); } this.CurrentRegions.Text = "Regions: " + regionList; } else { this.CurrentRegions.Text = "Regions: None selected"; } }
public void TestCase() { Regions regions = new Regions(); Assert.AreNotEqual(regions.Count, 0); Assert.AreEqual(regions.CountyById(50), "Kent"); Assert.AreEqual(regions.CountyByName("East Sussex"), 33); }