public VideoDirectory(VideoDirectoryConfiguration videoDirectoryConfiguration, IVideoScanner videoScanner, IRandomProvider randomProvider)
        {
            Videos = new List<Video>();

            _videoDirectoryConfiguration = videoDirectoryConfiguration;
            _videoScanner = videoScanner;
            _randomProvider = randomProvider;

            ReinitializeVideoDirectory();
        }
Ejemplo n.º 2
0
        public Pool(PoolConfiguration poolConfiguration, IVideoScanner videoScanner, IRandomProvider randomProvider)
        {
            VideoDirectories = new List<VideoDirectory>();
            Videos = new List<Video>();

            _randomProvider = randomProvider;

            CurrentVideoDirectoryIndex = 0;
            _videoScanner = videoScanner;
            PoolConfiguration = poolConfiguration;
            InitializePool();
        }
        public virtual void Setup()
        {
            _blacklistStore = MockRepository.GenerateStub<IBlacklistStore>();
            _videoScannerProvider = MockRepository.GenerateStub<IVideoScannerProvider>();
            _videoScanner = MockRepository.GenerateStub<IVideoScanner>();

            _randomProvider = new RandomProvider(RandomSeed);

            _videoScannerProvider.Stub(x => x.GetVideoScanner(Arg<VideoScannerOptions>.Is.Anything)).Return(_videoScanner);

            GivenPlaylistConfiguration = new PlaylistConfigurationBuilder();
        }