public void Should_resolve_file_wildcards()
{
var fs = new Mock<IFileSystem>();
fs.Setup(f => f.EnumerateFiles("C:\\app\\content\\scripts", "*.js", System.IO.SearchOption.TopDirectoryOnly))
.Returns(new[] { "C:\\app\\content\\scripts\\1.js", "C:\\app\\content\\scripts\\2.js" });
fs.Setup(f => f.EnumerateFiles("C:\\app\\content\\other", "*.js", System.IO.SearchOption.TopDirectoryOnly))
.Returns(new[] { "C:\\app\\content\\other\\1.js" });
var b = new AssetResolver(fs.Object);
var result = b.GetAssets("C:\\app\\",
new[]
{
"content/scripts/*.js",
"content/other/*.js"
},
new[]
{
"content/other/*.js"
});
Assert.AreEqual("content/scripts/1.js", result[0].Path);
Assert.AreEqual("content/scripts/2.js", result[1].Path);
Assert.AreEqual(2, result.Count);
}