예제 #1
0
        public void AsyncMetarGet()
        {
            Station s = new Station("KAWO");
            Task t = s.GetCurrentObsAsyncWorker();
            t.Wait();

            Assert.IsNotNull(s.LocalMetar);
        }
예제 #2
0
 // does this interface really provide much, or should I just make people modify stations_ directly.
 // old c++ programmer wants a function on everything because my language can't hook things in.
 public void AddStation(string newStation)
 {
     // create a new metar and fire off the asynchronous read.
     Station st = new Station(newStation);
     StationsList.Add(st);
     // only update after attaching the UI so it knows to redraw
     Task ignoreTheWarning = st.GetCurrentObsAsyncWorker();
 }
예제 #3
0
        // does this interface really provide much, or should I just make people modify stations_ directly.
        // old c++ programmer wants a function on everything because my language can't hook things in.
        public void AddStation(string newStation)
        {
            // create a new metar and fire off the asynchronous read.
            Station st = new Station(newStation);
            StationsList.Add(st);

            if (true)
            {
                // only update after attaching the UI so it knows to redraw
                //Task t = System.Threading.Tasks.Task.Run(async () => await st.GetCurrentObsAsyncWorker());
                //t.Wait();
            }
            Task ignoreTheWarningIWantToRunFree = st.GetCurrentObsAsyncWorker();
            //ignoreTheWarningIWantToRunFree.Wait();
        }
예제 #4
0
        public void TestBadStation()
        {
            Station s = new Station("KAWO");

            Assert.IsTrue(s.IsBad());
        }
예제 #5
0
        public void BasicIDTest()
        {
            Station st = new Station("KBFI");

            Assert.AreEqual<string>("KBFI", st.StationID);
        }