Esempio n. 1
0
 public AviSynthWriteService(IAviSynthFileService fileService, IAviSynthValidationService validationService, AviSynthTemplateScript avsScript, AviSynthBatchSettings avsBatchSettings)
 {
     _fileService = fileService;
     _validationService = validationService;
     _avsScript = avsScript;
     _avsBatchSettings = avsBatchSettings;
 }
Esempio n. 2
0
        public void naming_convention_is_empty_test()
        {
            AviSynthBatchSettings avsBatchSettings;
            IAviSynthValidationService validationService;

            //given an empty batch directory
            avsBatchSettings = new AviSynthBatchSettings() { AviSynthFilesOutputDirectoryPath = "C:\\temp", NamingConvention = string.Empty, NumberOfFiles = 1 };
            //when I validate
            validationService = new AviSynthValidationService(avsBatchSettings);
            ErrorCollection errors = validationService.Validate();
            //then error list contains error
            Assert.AreEqual(errors[0].Description, "Naming Convention is required");
        }
Esempio n. 3
0
        public void batch_directory_is_invalid_directory_test()
        {
            AviSynthBatchSettings avsBatchSettings;
            IAviSynthValidationService validationService;

            //given an empty batch directory
            avsBatchSettings = new AviSynthBatchSettings() { AviSynthFilesOutputDirectoryPath = "BatchDirectory", NamingConvention = "NamingConvention", NumberOfFiles = 1 };
            //when I validate
            validationService = new AviSynthValidationService(avsBatchSettings);
            ErrorCollection errors = validationService.Validate();
            //then error list contains error
            Assert.AreEqual(errors[0].Description, "Batch Directory does not exist!");
        }
Esempio n. 4
0
        public void avsfile_has_correct_name_test()
        {
            AviSynthBatchSettings avsBatchSettings;
            IAviSynthFileService fileService;
            AviSynthTemplateScript avsTemplateScript;

            //given correct settings
            avsBatchSettings = new AviSynthBatchSettings() { AviSynthFilesOutputDirectoryPath = "C:\\Temp", NamingConvention = "encode", NumberOfFiles = 9 };
            avsTemplateScript = new AviSynthTemplateScript() {  Script = string.Empty};
            //when I create the avs file batch
            fileService = new AviSynthFileService(avsBatchSettings, avsTemplateScript);
            List<AviSynthFile> avsFiles = fileService.CreateAVSFileList();
            //then error list contains error
            avsFiles[0].FileNameOnly.Should().Be("encode01.avs");
        }
 public AviSynthValidationService(AviSynthBatchSettings avsBatchSettings)
 {
     _avsBatchSettings = avsBatchSettings;
     _errors = new ErrorCollection();
 }
Esempio n. 6
0
 public AviSynthFileService(AviSynthBatchSettings avsBatchSettings, AviSynthTemplateScript avsTemplateScript)
 {
     _avsBatchSettings = avsBatchSettings;
     _avsTemplateScript = avsTemplateScript;
     _avsFiles = new List<AviSynthFile>();
 }