Exemple #1
0
        public void find_all_scripts_if_just_referring_to_script_files()
        {
            var theSet = new ScriptSet();
            theSet.Add("a");
            theSet.Add("b");
            theSet.Add("c");

            theSet.FindScripts(theGraph);

            theSet.AllScripts().Select(x => x.Name).ShouldHaveTheSameElementsAs("a", "b", "c");
        }
Exemple #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 ScriptSet();
            theSet.Add("1");

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

            theSet.AllScripts().Select(x => x.Name).ShouldHaveTheSameElementsAs("A", "B", "C");
        }
Exemple #3
0
        public void find_all_scripts_from_a_mix_of_files_and_sets()
        {
            theGraph.AddToSet("1", "A");
            theGraph.AddToSet("1", "B");
            theGraph.AddToSet("1", "C");

            var theSet = new ScriptSet();
            theSet.Add("1");
            theSet.Add("D");

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

            theSet.AllScripts().Select(x => x.Name).ShouldHaveTheSameElementsAs("A", "B", "C", "D");
        }
Exemple #4
0
        public void find_all_scripts_2_deep_child_sets_with_files()
        {
            theGraph.AddToSet("1", "A");
            theGraph.AddToSet("1", "B");
            theGraph.AddToSet("1", "2");
            theGraph.AddToSet("2", "C");
            theGraph.AddToSet("2", "D");

            var theSet = new ScriptSet();
            theSet.Add("1");
            theSet.Add("E");

            theGraph.ScriptSetFor("1").FindScripts(theGraph);
            theGraph.ScriptSetFor("2").FindScripts(theGraph);
            theSet.FindScripts(theGraph);

            theSet.AllScripts().Select(x => x.Name).ShouldHaveTheSameElementsAs("A", "B", "C", "D", "E");
        }
Exemple #5
0
        public void should_not_return_duplicates()
        {
            theGraph.AddToSet("1", "A");
            theGraph.AddToSet("1", "B");
            theGraph.AddToSet("1", "2");
            theGraph.AddToSet("2", "C");
            theGraph.AddToSet("2", "D");

            var theSet = new ScriptSet();
            theSet.Add("1");
            theSet.Add("2");
            theSet.Add("E");

            theGraph.ScriptSetFor("1").FindScripts(theGraph);
            theGraph.ScriptSetFor("2").FindScripts(theGraph);
            theSet.FindScripts(theGraph);

            theSet.AllScripts().Select(x => x.Name).ShouldHaveTheSameElementsAs("A", "B", "C", "D", "E");
        }