Exemplo n.º 1
0
 public void Doesnt_get_files_for_asset_which_is_not_on_lookup_path()
 {
     var target = new AssetLoader(_lookupDirectories);
     var files = target.GetFiles(new [] { "test1.1.a.js" });
     Assert.AreEqual(0, files.Count);
 }
Exemplo n.º 2
0
 public void Get_all_files_for_asset_containing_require_self()
 {
     var target = new AssetLoader(_lookupDirectories);
     var files = target.GetFiles("test1.a.js");
     Assert.AreEqual(2, files.Count);
     Assert.AreEqual("test1.1.1.a.js", Path.GetFileName(files[0]));
     Assert.AreEqual("test1.a.js", Path.GetFileName(files[1]));
 }
Exemplo n.º 3
0
 public void Get_all_file_names_for_asset()
 {
     var target = new AssetLoader(_lookupDirectories);
     var files = target.GetFiles(new []{ "test1.b.js" });
     Assert.AreEqual(6, files.Count);
     Assert.AreEqual("test1.b.js", Path.GetFileName(files[0]));
     Assert.AreEqual("test1.1.a.js", Path.GetFileName(files[1]));
     Assert.AreEqual("test1.1.1.a.js", Path.GetFileName(files[2]));
     Assert.AreEqual("test1.1.1.b.js", Path.GetFileName(files[3]));
     Assert.AreEqual("test1.2.a.js", Path.GetFileName(files[4]));
     Assert.AreEqual("test1.2.b.js", Path.GetFileName(files[5]));
 }