private StorageHierarchiesBuilder ReadConfiguration(string xml) { var element = new TestConfigurationProvider <StorageElementCollection>().GetAsElement(xml); var builder = new StorageHierarchiesBuilder(new StubFileSystemApi(FileSystemCasing.CasePreservingInsensitive)); var reader = new StorageConfigurationReader(); reader.Read(element, builder); return(builder); }
private static void ValidateStorageConfiguration(XElement storageElement) { var element = new TestConfigurationProvider <StorageElementCollection>() .GetAsElement(CreateDummyElementFromInnerXml(storageElement)); var builder = new StorageHierarchiesBuilder(new StubFileSystemApi(FileSystemCasing.CasePreservingInsensitive)); var reader = new StorageConfigurationReader(); reader.Read(element, builder); builder.BuildHierarchies(); Assert.That(reader.Errors, Is.Empty); Assert.That(builder.Errors, Is.Empty); }