예제 #1
0
        public void should_download_video_when_informed_youtubewrapper_and_save_folder()
        {
            var service  = new TestableVideoService(FakeYouTubeWrapper);
            var filename = service.Download(@"C:\Temp");

            Assert.IsTrue(!string.IsNullOrEmpty(filename));
        }
예제 #2
0
        public void should_not_download_video_when_invalid_save_folder_informed()
        {
            var service  = new TestableVideoService(FakeYouTubeWrapper);
            var filename = service.Download(null);

            Assert.IsTrue(string.IsNullOrEmpty(filename));
        }
예제 #3
0
        public void should_fail_download_when_cannot_save_on_disk()
        {
            var service = new TestableVideoService(FakeYouTubeWrapper)
            {
                FailOnSaveToDisk = true
            };
            var filename = service.Download(null);

            Assert.IsTrue(string.IsNullOrEmpty(filename));
        }
예제 #4
0
        public void should_create_instance_of_type_VideoService()
        {
            var service = new TestableVideoService(null);

            Assert.IsInstanceOfType(service, typeof(IVideoService));
        }