public TvShowImagesServiceTests() { _fileSystemService = Substitute.For<IFileSystemService>(); _path = @"C:\Folder\TV Shows\Game of Thrones"; _tvShowFileService = Substitute.For<ITvShowFileService>(); TvShowImages images = new TvShowImages { Fanart = @"C:\Folder\TV Shows\Game of Thrones\fanart.jpg", Poster = @"C:\Folder\TV Shows\Game of Thrones\poster.jpg", Banner = @"C:\Folder\TV Shows\Game of Thrones\banner.jpg", Seasons = new List<Season> { new Season { SeasonNumber = 0, Path = @"C:\Folder\TV Shows\Game of Thrones\Specials", PosterUrl = @"C:\Folder\TV Shows\Game of Thrones\season-specials-poster.jpg", BannerUrl = @"C:\Folder\TV Shows\Game of Thrones\season-specials-banner.jpg" }, new Season { SeasonNumber = 1, Path = @"C:\Folder\TV Shows\Game of Thrones\Season 1", PosterUrl = @"C:\Folder\TV Shows\Game of Thrones\season01-poster.jpg", BannerUrl = @"C:\Folder\TV Shows\Game of Thrones\season01-banner.jpg" } } }; _tvShowFileService.GetShowImages(_path) .Returns(images.ToTask()); _service = new TvShowImagesService(_fileSystemService, _tvShowFileService); }
public TvShowViewModel(ITvShowViewModelFactory viewModelFactory, ITvShowFileService tvShowFileService, ITvShowMetadataService metadataService, IBusyProvider busyProvider, IDialogViewer dialogViewer, IProgressManagerViewModel progressManager, IKeyDataStore keyDataStore, string path) : base(busyProvider, dialogViewer) { _viewModelFactory = viewModelFactory; _tvShowFileService = tvShowFileService; _metadataService = metadataService; _busyProvider = busyProvider; Title = new RequiredPropertyDecorator <string>(new StringCachedPropertyDecorator(keyDataStore, path)); Title.PropertyChanged += TitleValueChanged; Path = path; Selection = viewModelFactory.GetTvShowSelection(this); RefreshCommand = new RefreshMetadataCommand(this); UpdateCommand = new UpdateMetadataCommand(this, progressManager, busyProvider); SaveCommand = new SaveMetadataCommand(this); DeleteCommand = new DeleteMetadataCommand(this); Images = viewModelFactory.GetTvShowImages(this, path); ActorManager = viewModelFactory.GetActorManager(path, () => OnPropertyChanged("ActorManager")); Genres = new DashDelimitedCollectionViewModel <string>(s => s); // We need to set a "dummy" item in the collection for an arrow to appear in the TreeView since we're lazy-loading the items under it Children.Add(_viewModelFactory.GetSeason(this, "dummy")); }
public TvShowImagesServiceTests() { _fileSystemService = Substitute.For <IFileSystemService>(); _path = @"C:\Folder\TV Shows\Game of Thrones"; _tvShowFileService = Substitute.For <ITvShowFileService>(); TvShowImages images = new TvShowImages { Fanart = @"C:\Folder\TV Shows\Game of Thrones\fanart.jpg", Poster = @"C:\Folder\TV Shows\Game of Thrones\poster.jpg", Banner = @"C:\Folder\TV Shows\Game of Thrones\banner.jpg", Seasons = new List <Season> { new Season { SeasonNumber = 0, Path = @"C:\Folder\TV Shows\Game of Thrones\Specials", PosterUrl = @"C:\Folder\TV Shows\Game of Thrones\season-specials-poster.jpg", BannerUrl = @"C:\Folder\TV Shows\Game of Thrones\season-specials-banner.jpg" }, new Season { SeasonNumber = 1, Path = @"C:\Folder\TV Shows\Game of Thrones\Season 1", PosterUrl = @"C:\Folder\TV Shows\Game of Thrones\season01-poster.jpg", BannerUrl = @"C:\Folder\TV Shows\Game of Thrones\season01-banner.jpg" } } }; _tvShowFileService.GetShowImages(_path) .Returns(images.ToTask()); _service = new TvShowImagesService(_fileSystemService, _tvShowFileService); }
public TvShowImagesViewModelTests() { _tvShowFileService = Substitute.For <ITvShowFileService>(); _metadataService = Substitute.For <ITvShowMetadataService>(); _busyProvider = Substitute.For <IBusyProvider>(); _path = @"C:\Folder\TV Shows\Game of Thrones"; _viewModel = new TvShowImagesViewModel(_tvShowFileService, _metadataService, null, null, _busyProvider, _path); }
public TvShowImagesViewModelTests() { _tvShowFileService = Substitute.For<ITvShowFileService>(); _metadataService = Substitute.For<ITvShowMetadataService>(); _busyProvider = Substitute.For<IBusyProvider>(); _path = @"C:\Folder\TV Shows\Game of Thrones"; _viewModel = new TvShowImagesViewModel(_tvShowFileService, _metadataService, null, null, _busyProvider, _path); }
public SeasonViewModelTests() { _viewModelFactory = Substitute.For <ITvShowViewModelFactory>(); _tvShowFileService = Substitute.For <ITvShowFileService>(); _tvShowMetadata = Substitute.For <ITvShowViewModel>(); _busyProvider = _busyProvider = Substitute.For <IBusyProvider>(); _path = @"C:\Folder\TV Shows\Game of Thrones\Season 1"; _viewModel = new SeasonViewModel(_viewModelFactory, _tvShowFileService, _tvShowMetadata, null, _busyProvider, _path); }
public SeasonViewModelTests() { _viewModelFactory = Substitute.For<ITvShowViewModelFactory>(); _tvShowFileService = Substitute.For<ITvShowFileService>(); _tvShowMetadata = Substitute.For<ITvShowViewModel>(); _busyProvider = _busyProvider = Substitute.For<IBusyProvider>(); _path = @"C:\Folder\TV Shows\Game of Thrones\Season 1"; _viewModel = new SeasonViewModel(_viewModelFactory, _tvShowFileService, _tvShowMetadata, null, _busyProvider, _path); }
public TvShowImagesViewModel(ITvShowFileService tvShowFileService, ITvShowMetadataService metadataService, ITvShowViewModelFactory viewModelFactory, ITvShowViewModel metadataViewModel, IBusyProvider busyProvider, string path) { _tvShowFileService = tvShowFileService; _viewModelFactory = viewModelFactory; _busyProvider = busyProvider; _path = path; SeasonImages = new ObservableCollection<ISeasonImagesViewModel>(); FanartUrl = viewModelFactory.GetImage(true, new FanartImageStrategy(metadataService, metadataViewModel)); PosterUrl = viewModelFactory.GetImage(true, new PosterImageStrategy(metadataService, metadataViewModel)); BannerUrl = viewModelFactory.GetImage(false, new BannerImageStrategy(metadataService, metadataViewModel)); }
public TvShowImagesViewModel(ITvShowFileService tvShowFileService, ITvShowMetadataService metadataService, ITvShowViewModelFactory viewModelFactory, ITvShowViewModel metadataViewModel, IBusyProvider busyProvider, string path) { _tvShowFileService = tvShowFileService; _viewModelFactory = viewModelFactory; _busyProvider = busyProvider; _path = path; SeasonImages = new ObservableCollection <ISeasonImagesViewModel>(); FanartUrl = viewModelFactory.GetImage(true, new FanartImageStrategy(metadataService, metadataViewModel)); PosterUrl = viewModelFactory.GetImage(true, new PosterImageStrategy(metadataService, metadataViewModel)); BannerUrl = viewModelFactory.GetImage(false, new BannerImageStrategy(metadataService, metadataViewModel)); }
public SeasonViewModel(ITvShowViewModelFactory viewModelFactory, ITvShowFileService tvShowFileService, ITvShowViewModel tvShowMetadata, ITvShowMetadataService metadataService, IBusyProvider busyProvider, string path) : base(busyProvider, viewModelFactory.GetEpisode(tvShowMetadata, "dummy")) { _viewModelFactory = viewModelFactory; _tvShowFileService = tvShowFileService; _tvShowMetadata = tvShowMetadata; _busyProvider = busyProvider; _path = path; _posterUrl = viewModelFactory.GetImage(true, new SeasonPosterImageStrategy(metadataService, tvShowMetadata.Path, path)); _bannerUrl = viewModelFactory.GetImage(false, new SeasonBannerImageStrategy(metadataService, tvShowMetadata.Path, path)); }
public TvShowViewModelTests() { _viewModelFactory = Substitute.For<ITvShowViewModelFactory>(); _tvShowFileService = Substitute.For<ITvShowFileService>(); _metadataService = Substitute.For<ITvShowMetadataService>(); _busyProvider = Substitute.For<IBusyProvider>(); _keyDataStore = Substitute.For<IKeyDataStore>(); _path = @"C:\Folder\TV Shows\Game of Thrones"; _viewModelFactory = Substitute.For<ITvShowViewModelFactory>(); IActorManagerViewModel actorManager = Substitute.For<IActorManagerViewModel>(); actorManager.Actors .Returns(new ObservableCollection<IActorViewModel>()); _viewModelFactory.GetActorManager(_path, Arg.Any<Action>()) .Returns(actorManager); _viewModel = new TvShowViewModel(_viewModelFactory, _tvShowFileService, _metadataService, _busyProvider, null, null, _keyDataStore, _path); }
public TvShowViewModelTests() { _viewModelFactory = Substitute.For <ITvShowViewModelFactory>(); _tvShowFileService = Substitute.For <ITvShowFileService>(); _metadataService = Substitute.For <ITvShowMetadataService>(); _busyProvider = Substitute.For <IBusyProvider>(); _keyDataStore = Substitute.For <IKeyDataStore>(); _path = @"C:\Folder\TV Shows\Game of Thrones"; _viewModelFactory = Substitute.For <ITvShowViewModelFactory>(); IActorManagerViewModel actorManager = Substitute.For <IActorManagerViewModel>(); actorManager.Actors .Returns(new ObservableCollection <IActorViewModel>()); _viewModelFactory.GetActorManager(_path, Arg.Any <Action>()) .Returns(actorManager); _viewModel = new TvShowViewModel(_viewModelFactory, _tvShowFileService, _metadataService, _busyProvider, null, null, _keyDataStore, _path); }
public TvShowViewModelFactory(ISourceService sourceService, IFileSystemService fileSystemService, ITvShowFileService tvShowFileService, ITvShowMetadataService tvShowMetadataService, IEpisodeMetadataService episodeMetadataService, IProgressManagerViewModel progressManagerViewModel, IKeyDataStore keyDataStore, IBusyProvider busyProvider, IDialogViewer dialogViewer, IActorViewModelFactory actorViewModelFactory) { _sourceService = sourceService; _fileSystemService = fileSystemService; _tvShowFileService = tvShowFileService; _tvShowMetadataService = tvShowMetadataService; _episodeMetadataService = episodeMetadataService; _progressManagerViewModel = progressManagerViewModel; _keyDataStore = keyDataStore; _busyProvider = busyProvider; _dialogViewer = dialogViewer; _actorViewModelFactory = actorViewModelFactory; }
public TvShowViewModelFactory(ISourceService sourceService, IFileSystemService fileSystemService, ITvShowFileService tvShowFileService, ITvShowMetadataService tvShowMetadataService, IEpisodeMetadataService episodeMetadataService, IProgressManagerViewModel progressManagerViewModel, IKeyDataStore keyDataStore, IBusyProvider busyProvider, IDialogViewer dialogViewer, IActorViewModelFactory actorViewModelFactory) { _sourceService = sourceService; _fileSystemService = fileSystemService; _tvShowFileService = tvShowFileService; _tvShowMetadataService = tvShowMetadataService; _episodeMetadataService = episodeMetadataService; _progressManagerViewModel = progressManagerViewModel; _keyDataStore = keyDataStore; _busyProvider = busyProvider; _dialogViewer = dialogViewer; _actorViewModelFactory = actorViewModelFactory; }
public TvShowImagesService(IFileSystemService fileSystemService, ITvShowFileService tvShowFileService) { _fileSystemService = fileSystemService; _tvShowFileService = tvShowFileService; }
public TvShowImagesService(IFileSystemService fileSystemService, ITvShowFileService tvShowFileService) { _fileSystemService = fileSystemService; _tvShowFileService = tvShowFileService; }