Exemple #1
0
        public void ShowDetailViewsTest()
        {
            var view = Container.GetExportedValue <MockShellView>();

            Assert.IsTrue(view.IsVisible);

            var viewModel = Container.GetExportedValue <ShellViewModel>();

            Assert.IsFalse(viewModel.IsMusicPropertiesViewVisible);
            Assert.IsTrue(viewModel.IsPlaylistViewVisible);
            Assert.IsFalse(viewModel.IsTranscodingListViewVisible);


            shellService.ShowMusicPropertiesView();
            Assert.IsTrue(viewModel.IsMusicPropertiesViewVisible);
            Assert.IsFalse(viewModel.IsPlaylistViewVisible);
            Assert.IsFalse(viewModel.IsTranscodingListViewVisible);

            shellService.ShowTranscodingListView();
            Assert.IsFalse(viewModel.IsMusicPropertiesViewVisible);
            Assert.IsFalse(viewModel.IsPlaylistViewVisible);
            Assert.IsTrue(viewModel.IsTranscodingListViewVisible);

            shellService.ShowPlaylistView();
            Assert.IsFalse(viewModel.IsMusicPropertiesViewVisible);
            Assert.IsTrue(viewModel.IsPlaylistViewVisible);
            Assert.IsFalse(viewModel.IsTranscodingListViewVisible);
        }
 private void Transcode(IReadOnlyCollection <MusicFile> musicFiles)
 {
     shellService.ShowTranscodingListView();
     foreach (var musicFile in musicFiles)
     {
         TranscodeAsync(musicFile);
     }
 }