public void Setup()
 {
     lakselvAirport = new Airport("LKL", "Lakselv");
     trondheimAirport = new Airport("TRD", "Trondheim");
     flightsService = new FlightsServiceStub();
     objectStore = new ObjectStoreStub();
     viewModel = new FlightsViewModel(flightsService, objectStore);
 }
        public void Finds_nearest_airport_if_option_is_selected()
        {
            objectStore.Save(Airport.Nearest, ObjectStore.SelectedAirportFilename);

            bool findNearestWasPublished = false;
            Messenger.Default.Register(this, (FindNearestAirportMessage m) => findNearestWasPublished = true);

            viewModel = new FlightsViewModel(flightsService, objectStore);

            Assert.IsTrue(findNearestWasPublished);
        }
        public void Loads_selected_airport_if_saved_to_disk()
        {
            objectStore.Save(lakselvAirport, ObjectStore.SelectedAirportFilename);

            viewModel = new FlightsViewModel(flightsService, objectStore);

            Assert.AreEqual(lakselvAirport.Code, viewModel.SelectedAirport.Code);
        }