Exemplo n.º 1
0
 private static CacheRepository InitializeSut()
 {
     var jsonSerializer = new JsonContractSerializer();
     innerRepository = new FakeRepository(jsonSerializer);
     var memCache = new InMemoryCacheProvider();
     var sut = new CacheRepository(innerRepository, memCache);
     return sut;
 }
Exemplo n.º 2
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;
        }