public void GetDataValidQueryTest() { try { ParkingMeter meter = APIDataStore.GetData("5601"); Assert.IsNotNull(meter); Assert.AreEqual("5601", meter.METER_NO); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public PostScanPage(Result result) { meter = APIDataStore.GetData(result.Text); FormattedString fs = new FormattedString(); bool btnEnabled = true; if (meter.METER_NO != null) { fs = SetLabelMeterDetails(meter); } else { btnEnabled = false; fs.Spans.Add(new Span { Text = "We were unable to retrieve\nthe data for this meter.\nPlease try again later.", FontSize = 20 }); } InitializeComponent(); labelDetails.FormattedText = fs; btnStart.IsVisible = btnEnabled; btnStart.IsEnabled = btnEnabled; }
public void GetDataInvalidQueryTest() { ParkingMeter meter = APIDataStore.GetData("4000"); }