public static void ClearBuses() { if (buses == null) { return; } buses.Cleanup(); buses = null; }
public static void CreateBuses() { if (buses == null) { buses = container.Resolve<BusesViewModel>(); } }
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; }