public void SetUp()
        {
            var existingTempFolder = TempFolderFactory.CreateNonExistingTempFolder();

            _directoryInfo = new DirectoryInfo(existingTempFolder);
            _sut           = new AksKeyVaultSecretDirectoryInfo(_directoryInfo);
        }
        public void should_throw_DirectoryNotFoundException()
        {
            var rootFolder = TempFolderFactory.CreateNonExistingTempFolder();
            var action     = new Action(() => new AksKeyVaultSecretFileProvider(rootFolder));

            action.Should().Throw <DirectoryNotFoundException>();
        }
        public void should_not_throw_any_Exception()
        {
            var rootFolder = TempFolderFactory.CreateExistingTempFolder();
            var action     = new Action(() => new AksKeyVaultSecretFileProvider(rootFolder));

            action.Should().NotThrow();
        }
        public void SetUp()
        {
            var rootFolder = TempFolderFactory.CreateExistingTempFolder();
            _sut = new AksKeyVaultSecretFileProvider(rootFolder);

            _subDirectoryName = Guid.NewGuid()
                .ToString("N")
                .Substring(0, 5);

            Directory.CreateDirectory(Path.Combine(rootFolder, _subDirectoryName));
        }
        public void SetUp()
        {
            var rootFolder = TempFolderFactory.CreateExistingTempFolder();

            _sut = new AksKeyVaultSecretFileProvider(rootFolder);

            _fileName = Guid.NewGuid()
                        .ToString("N")
                        .Substring(0, 5);

            File.WriteAllText(Path.Combine(rootFolder, _fileName), "bigfoot is real");
        }
Пример #6
0
        public void SetUp()
        {
            var rootFolder = TempFolderFactory.CreateExistingTempFolder();
            var fileName   = Guid.NewGuid()
                             .ToString("N")
                             .Substring(0, 5);

            var filePath = Path.Combine(rootFolder, fileName);

            _fileInfo = new FileInfo(filePath);

            _sut = new AksKeyVaultSecretFileInfo(_fileInfo);
        }
Пример #7
0
 public void SetUp()
 {
     _rootFolder = TempFolderFactory.CreateExistingTempFolder();
     _sut        = new AksKeyVaultSecretFileProvider(_rootFolder);
 }
Пример #8
0
 /// <summary>
 /// Конвертация файла
 /// </summary>
 /// <param name="source">Путь к файлу</param>
 /// <param name="destination">Путь к сконверченному файлу</param>
 /// <param name="wkArgs">Аргументы для запуска wkhtmltopdf</param>
 /// <returns></returns>
 public bool Convert(string source, string destination, string wkArgs)
 {
     using (var temp = TempFolderFactory.Create()) {
         return(ConvertInternal(temp.Path, source, destination, wkArgs));
     }
 }