Example #1
0
        public void PlaylistMenu_ContainsAllCommands()
        {
            var playlistCollectionVM = new PlaylistCollectionVM();

            Assert.AreEqual(3, playlistCollectionVM.PlaylistMenu.ViewModels.Count);
            Assert.AreEqual(PLAYLIST_EDIT, playlistCollectionVM.PlaylistMenu.ViewModels [0].Name);
            Assert.AreEqual(PLAYLIST_RENDER, playlistCollectionVM.PlaylistMenu.ViewModels [1].Name);
            Assert.AreEqual(PLAYLIST_DELETE, playlistCollectionVM.PlaylistMenu.ViewModels [2].Name);
        }
Example #2
0
 void SetupWithStorage()
 {
     controller           = new PlaylistController();
     playlistCollectionVM = new PlaylistCollectionVM();
     controller.SetViewModel(new DummyPlaylistsManagerVM {
         Playlists = playlistCollectionVM,
         Player    = videoPlayerVM
     });
     controller.Start();
 }
Example #3
0
        void SetupWithProject()
        {
            controller = new PlaylistControllerWithProject();
            Project project = Utils.CreateProject(true);

            projectVM = new DummyProjectVM {
                Model = project
            };
            playlistCollectionVM = projectVM.Playlists;
            var viewModel = new ProjectAnalysisVM <ProjectVM> {
                Project = projectVM, VideoPlayer = videoPlayerVM
            };

            controller.SetViewModel(viewModel);
            controller.Start();
        }
Example #4
0
        public void PlaylistElementMenu_ContainsAllCommands()
        {
            var playlistCollectionVM = new PlaylistCollectionVM();

            Assert.AreEqual(4, playlistCollectionVM.PlaylistElementMenu.ViewModels.Count);
            Assert.AreEqual(2, playlistCollectionVM.PlaylistElementMenu.ViewModels [1].Submenu.ViewModels.Count);
            Assert.AreEqual(2, playlistCollectionVM.PlaylistElementMenu.ViewModels [2].Submenu.ViewModels.Count);
            Assert.AreEqual(ELEMENT_EDIT, playlistCollectionVM.PlaylistElementMenu.ViewModels [0].Name);
            Assert.AreEqual(ELEMENT_INSERT_BEFORE, playlistCollectionVM.PlaylistElementMenu.ViewModels [1].Name);
            Assert.AreEqual(ELEMENT_INSERT_AFTER, playlistCollectionVM.PlaylistElementMenu.ViewModels [2].Name);
            Assert.AreEqual(ELEMENT_DELETE, playlistCollectionVM.PlaylistElementMenu.ViewModels [3].Name);
            Assert.AreEqual(ELEMENT_VIDEO, playlistCollectionVM.PlaylistElementMenu.ViewModels [1].Submenu.ViewModels [0].Name);
            Assert.AreEqual(ELEMENT_IMAGE, playlistCollectionVM.PlaylistElementMenu.ViewModels [1].Submenu.ViewModels [1].Name);
            Assert.AreEqual(ELEMENT_VIDEO, playlistCollectionVM.PlaylistElementMenu.ViewModels [2].Submenu.ViewModels [0].Name);
            Assert.AreEqual(ELEMENT_IMAGE, playlistCollectionVM.PlaylistElementMenu.ViewModels [2].Submenu.ViewModels [1].Name);
        }
Example #5
0
        public async Task Setup()
        {
            App.Current.GUIToolkit = mockGuiToolkit.Object;
            videoPlayerController  = new Mock <IVideoPlayerController> ();
            videoPlayerVM          = new VideoPlayerVM();
            videoPlayerVM.Player   = videoPlayerController.Object;
            LMProject project = Utils.CreateProject(true);

            project.ProjectType = ProjectType.FileProject;
            projectVM           = new LMProjectVM {
                Model = project
            };
            playlistCollectionVM = projectVM.Playlists;
            LMProjectAnalysisVM viewModel = new LMProjectAnalysisVM();

            viewModel.Project     = projectVM;
            viewModel.VideoPlayer = videoPlayerVM;
            sut = new LMPlaylistController();
            sut.SetViewModel(viewModel);
            await sut.Start();
        }
Example #6
0
        public void Setup()
        {
            mockDialogs            = new Mock <IDialogs> ();
            App.Current.GUIToolkit = mockGuiToolkit.Object;
            App.Current.Dialogs    = mockDialogs.Object;
            videoPlayerController  = new Mock <IVideoPlayerController> ();
            videoPlayerVM          = new VideoPlayerVM();
            videoPlayerVM.Player   = videoPlayerController.Object;
            LMProject project = Utils.CreateProject(true);

            project.ProjectType = ProjectType.FileProject;
            projectVM           = new LMProjectVM {
                Model = project
            };
            playlistCollectionVM = projectVM.Playlists;
            LMProjectAnalysisVM viewModel = new LMProjectAnalysisVM();

            viewModel.Project     = projectVM;
            viewModel.VideoPlayer = videoPlayerVM;
            controller            = new LMPlaylistController();
            controller.SetViewModel(viewModel);
            controller.Start();
        }