コード例 #1
0
 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);
     }
 }
コード例 #2
0
        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;
        }
コード例 #3
0
 public void GetDataInvalidQueryTest()
 {
     ParkingMeter meter = APIDataStore.GetData("4000");
 }