示例#1
0
        public void using_the_configure_method()
        {
            var graph      = new AssetGraph();
            var expression = new AssetsExpression(theRegistry, graph);

            expression.Configure(@"
crud includes a.js, b.js, c.js
");

            graph.CompileDependencies(new PackageLog());

            graph.AssetSetFor("crud").AllFileDependencies()
            .Select(x => x.Name)
            .ShouldHaveTheSameElementsAs("a.js", "b.js", "c.js");
        }
示例#2
0
        public void find_all_scripts_if_the_set_refers_to_another_set()
        {
            theGraph.AddToSet("1", "A");
            theGraph.AddToSet("1", "B");
            theGraph.AddToSet("1", "C");

            var theSet = new AssetSet();

            theSet.Add("1");

            theGraph.AssetSetFor("1").FindScripts(theGraph);
            theSet.FindScripts(theGraph);

            theSet.AllFileDependencies().Select(x => x.Name).ShouldHaveTheSameElementsAs("A", "B", "C");
        }
示例#3
0
 public void get_a_set_for_an_empty_graph_returns_an_empty_set_of_that_name()
 {
     theGraph.AssetSetFor("some name")
     .ShouldNotBeNull()
     .Name.ShouldEqual("some name");
 }