DiskContentLoaderTests ShouldCreateMetaDataFileIfNoneExists Method Delta Engine Documentation

Namespace: DeltaEngine.Content.Disk.Tests
Assembly: DeltaEngine.Content.Disk.Tests (in DeltaEngine.Content.Disk.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void ShouldCreateMetaDataFileIfNoneExists()
Examples

[Test]
public void ShouldCreateMetaDataFileIfNoneExists()
{
    Directory.CreateDirectory(ExtraContentDirectoryName);
    var files = Directory.GetFiles(ContentProjectDirectoryName, "*.png");
    File.Copy(files[0], Path.Combine(ExtraContentDirectoryName, Path.GetFileName(files[0])));
    string metaDataFilePath = Path.Combine(ExtraContentDirectoryName, "ContentMetaData.xml");
    var contentLoader = (DiskContentLoader)ContentLoader.current;
    contentLoader.LoadMetaData(metaDataFilePath);
    Assert.IsTrue(File.Exists(metaDataFilePath));
}
See Also