public void AsyncMetarGet() { Station s = new Station("KAWO"); Task t = s.GetCurrentObsAsyncWorker(); t.Wait(); Assert.IsNotNull(s.LocalMetar); }
// 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(); }
// 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(); }
public void TestBadStation() { Station s = new Station("KAWO"); Assert.IsTrue(s.IsBad()); }
public void BasicIDTest() { Station st = new Station("KBFI"); Assert.AreEqual<string>("KBFI", st.StationID); }