private IEnumerable <ShellSettings> LoadSettingsInternal() { foreach (var folder in _fileSystem.ListFolders(null)) { foreach (var file in _fileSystem.ListFiles(folder.GetPath())) { if (!String.Equals(file.GetName(), Constants.ShellSettingsFileName)) { continue; } using (var stream = file.OpenRead()) { using (var reader = new StreamReader(stream)) yield return(ShellSettingsSerializer.ParseSettings(reader.ReadToEnd())); } } } }
public void RenameFileShouldCreateANewFileAndRemoveTheOld() { _azureBlobStorageProvider.CreateFile("foo1.txt"); _azureBlobStorageProvider.RenameFile("foo1.txt", "foo2.txt"); var files = _azureBlobStorageProvider.ListFiles(""); Assert.AreEqual(1, files.Count()); Assert.That(files.First().GetPath().Equals("foo2.txt"), Is.True); Assert.That(files.First().GetName().Equals("foo2.txt"), Is.True); }