public void Setup() { editorMock = new Mock <IVideoEditor> (); var capturerMock = new Mock <IFramesCapturer> (); capturerMock.Setup(c => c.GetFrame(It.IsAny <Time> (), It.IsAny <bool> (), It.IsAny <int> (), It.IsAny <int> ())). Returns(Utils.LoadImageFromFile()); // Mock IMultimediaToolkit var mtk = new Mock <IMultimediaToolkit> (); mtk.Setup(m => m.GetVideoEditor()).Returns(editorMock.Object); mtk.Setup(m => m.GetFramesCapturer()).Returns(capturerMock.Object); // and guitoolkit var gtk = new Mock <IGUIToolkit> (); gtk.SetupGet(o => o.DeviceScaleFactor).Returns(1.0f); // And eventbroker App.Current.GUIToolkit = gtk.Object; App.Current.MultimediaToolkit = mtk.Object; App.Current.DrawingToolkit = new CairoBackend(); App.Current.EventsBroker = new EventsBroker(); manager = new JobsManagerVM { Model = new RangeObservableCollection <Job> () }; controller = new RenderingJobsController(manager); controller.Start(); }
public static void RegisterServices(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit) { App.Current.DependencyRegistry.Register <ITimer, Timer> (1); App.Current.DependencyRegistry.Register <IStorageManager, CouchbaseManagerLongoMatch> (1); App.Current.DependencyRegistry.Register <IFileStorage, LMFileStorage> (1); App.Current.MultimediaToolkit = multimediaToolkit; App.Current.GUIToolkit = guiToolkit; App.Current.EventsBroker = new EventsBroker(); App.Current.EventsBroker.Subscribe <QuitApplicationEvent> (HandleQuitApplicationEvent); RegisterService(App.Current.LicenseLimitationsService); /* Start DB services */ dbManager = new DataBaseManager(); RegisterService(dbManager); ts = new TemplatesService(); RegisterService(ts); /* Start the rendering jobs manager */ jobsManagerVM = new JobsManagerVM { Model = new RangeObservableCollection <Job> () }; App.Current.JobsManager = jobsManagerVM; RenderingJobsController jobsController = new RenderingJobsController(jobsManagerVM); RegisterService(jobsController); /* State the tools manager */ toolsManager = new ToolsManager(); RegisterService(toolsManager); ProjectsImporter = toolsManager; /* Start the hotkeys manager */ hkManager = new HotKeysManager(); RegisterService(hkManager); App.Current.HotkeysService = new HotkeysService(); RegisterService(App.Current.HotkeysService); GeneralUIHotkeys.RegisterDefaultHotkeys(); PlaybackHotkeys.RegisterDefaultHotkeys(); DrawingToolHotkeys.RegisterDefaultHotkeys(); LMGeneralUIHotkeys.RegisterDefaultHotkeys(); #if DEVEL AppUpdater notifier = new AppUpdater("Fluendo", "http://sparkle.fluendo.lan:8080/longomatch.xml"); #else AppUpdater notifier = new AppUpdater("Fluendo", "https://s3.amazonaws.com/oneplay-files/longomatch.xml"); #endif RegisterService(notifier); }
public static void RegisterServices(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit) { App.Current.DependencyRegistry.Register <ITimer, Timer> (1); App.Current.DependencyRegistry.Register <ISeeker, Seeker> (1); App.Current.DependencyRegistry.Register <IStorageManager, CouchbaseManagerLongoMatch> (1); App.Current.DependencyRegistry.Register <IFileStorage, LMFileStorage> (1); App.Current.DependencyRegistry.Register <IViewModelFactoryService> (new ViewModelFactoryService()); App.Current.MultimediaToolkit = multimediaToolkit; App.Current.GUIToolkit = guiToolkit; App.Current.EventsBroker = new EventsBroker(); App.Current.EventsBroker.Subscribe <QuitApplicationEvent> (HandleQuitApplicationEvent); if (App.Current.LicenseLimitationsService != null) { RegisterService(App.Current.LicenseLimitationsService); } /* Start DB services */ dbManager = new DataBaseManager(); RegisterService(dbManager); ts = new TemplatesService(); RegisterService(ts); /* Start the rendering jobs manager */ jobsManagerVM = new JobsManagerVM { Model = new RangeObservableCollection <Job> () }; App.Current.JobsManager = jobsManagerVM; RenderingJobsController jobsController = new RenderingJobsController(jobsManagerVM); RegisterService(jobsController); /* State the tools manager */ toolsManager = new ToolsManager(); RegisterService(toolsManager); ProjectsImporter = toolsManager; /* Start the hotkeys Service */ App.Current.HotkeysService = new HotkeysService(); RegisterService(App.Current.HotkeysService); GeneralUIHotkeys.RegisterDefaultHotkeys(); PlaybackHotkeys.RegisterDefaultHotkeys(); DrawingToolHotkeys.RegisterDefaultHotkeys(); LMGeneralUIHotkeys.RegisterDefaultHotkeys(); }
public static void RegisterServices (IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit) { App.Current.DependencyRegistry.Register<IStorageManager, CouchbaseManagerLongoMatch> (1); App.Current.DependencyRegistry.Register<IFileStorage, LMFileStorage> (1); App.Current.MultimediaToolkit = multimediaToolkit; App.Current.GUIToolkit = guiToolkit; App.Current.EventsBroker = new EventsBroker (); App.Current.EventsBroker.Subscribe<QuitApplicationEvent> (HandleQuitApplicationEvent); /* Start DB services */ dbManager = new DataBaseManager (); RegisterService (dbManager); ts = new TemplatesService (); RegisterService (ts); /* Start the rendering jobs manager */ jobsManagerVM = new JobsManagerVM { Model = new RangeObservableCollection<Job> () }; App.Current.JobsManager = jobsManagerVM; RenderingJobsController jobsController = new RenderingJobsController (jobsManagerVM); RegisterService (jobsController); projectsManager = new ProjectsManager (); RegisterService (projectsManager); /* State the tools manager */ toolsManager = new ToolsManager (); RegisterService (toolsManager); ProjectsImporter = toolsManager; /* Start the events manager */ eManager = new EventsManager (); RegisterService (eManager); RegisterService (new CoreEventsManager ()); /* Start the hotkeys manager */ hkManager = new HotKeysManager (); RegisterService (hkManager); /* Start playlists hotkeys manager */ plManager = new PlaylistManager (); RegisterService (plManager); }