示例#1
0
        public void DetectNewFiles_AfterNewTripsHaveAccepted_GotNone()
        {
            _photoStore = new PhotoStore(new PhotoRepo(forceNew: true), _localFileFolder, _locationService);

            _tripCreationService = new TripCreationService(_tripStore, _photoStore, _locationService);

            var result = _tripCreationService.Build();

            Assert.IsTrue(result.NumNewPhotos > 0);
            Assert.IsTrue(result.NumNewTrips > 0);
            Assert.IsTrue(result.NumNewDestinations > 0);
            Assert.IsTrue(result.NumNewTravelPhotos > 0);

            Assert.IsTrue(result.State.TaskState == BuildTaskState.Stopped);

            _tripCreationService.Stop();
            _tripCreationService.AddAll();

            // second time
            _tripCreationService = new TripCreationService(_tripStore, _photoStore, _locationService);

            var result2 = _tripCreationService.Build();

            Assert.IsTrue(result2.NumNewPhotos == 0);
        }
示例#2
0
        private async Task ExecOk()
        {
            //_tripCreationService.AddAll();

            _tripCreationService.AddAll();
            await Task.Delay(10);

            await _mainViewModel.GoHome();
        }
示例#3
0
        public HighliteTests()
        {
            ServiceBootStrapper.Configure();

            _googleClient      = new GoogleClient();
            _locationRepo      = new LocationRepo(TripLineConfig.LocationRepoPath);
            _placeRepo         = new PlaceRepo(TripLineConfig.PlaceRepoPath);
            _locationService   = new LocationService(_googleClient, _locationRepo, _placeRepo);
            _pictureExifReader = new PictureExifInformationReader();
            _localFileFolder   = new LocalFileFolders(_pictureExifReader);
            _photoStore        = new PhotoStore(new PhotoRepo(forceNew: false), _localFileFolder, _locationService);
            _tripSmartBuilder  = new TripSmartBuilder(_locationService, _photoStore, new DestinationBuilder(_locationService));
            _tripStore         = new TripStore(_photoStore, _locationService, _tripSmartBuilder, new TripsRepo(forceNew: false));
            _highliteService   = new HighliteService(_photoStore, _tripStore, _locationService);

            var tripCreationService = new TripCreationService(_tripStore, _photoStore, _locationService);

            var result = tripCreationService.Build();

            if (result.NumNewTrips > 0)
            {
                tripCreationService.AddAll();
            }
        }
示例#4
0
 public void AddAllTest([PexAssumeUnderTest] TripCreationService target)
 {
     target.AddAll();
     // TODO: add assertions to method TripCreationServiceTest.AddAllTest(TripCreationService)
 }