예제 #1
0
        public static void ClearBuses()
        {
            if (buses == null)
            {
                return;
            }

            buses.Cleanup();
            buses = null;
        }
예제 #2
0
 public static void CreateBuses()
 {
     if (buses == null)
     {
         buses = container.Resolve<BusesViewModel>();
     }
 }
예제 #3
0
        private static BusesViewModel GetSut(
            GeoPositionStatus positionStatus = GeoPositionStatus.Disabled,
            GeoCoordinate location = null)
        {
            locationService = new LocationServiceWp7Mock();
            var jsonSerializer = new JsonContractSerializer();
            var repository = new FakeRepository(jsonSerializer);
            var vm = new BusesViewModel(locationService, repository);

            if (positionStatus == GeoPositionStatus.Ready)
            {
                locationService.ChangeStatus(positionStatus);
                locationService.ChangeLocation(location);
            }

            return vm;
        }