コード例 #1
0
ファイル: AssetGraphTester.cs プロジェクト: rmueller/fubumvc
        public void add_to_combination()
        {
            theGraph.AddToCombination("c1", "a.js");
            theGraph.NamesForCombination("c1").ShouldHaveTheSameElementsAs("a.js");

            theGraph.AddToCombination("c2", "b.js, c.js, d.js");
            theGraph.NamesForCombination("c2").ShouldHaveTheSameElementsAs("b.js", "c.js", "d.js");

            theGraph.AddToCombination("c3", "b.js,c.js,d.js");
            theGraph.NamesForCombination("c3").ShouldHaveTheSameElementsAs("b.js", "c.js", "d.js");
        }
        protected override void beforeEach()
        {
            theGraph = new AssetGraph();
            Services.Inject(theGraph);

            theCache = new AssetCombinationCache();
            Services.Inject <IAssetCombinationCache>(theCache);

            Services.Inject <IAssetFileGraph>(new StubAssetFileGraph());

            theGraph.AddToCombination("combo1", "a.js");
            theGraph.AddToCombination("combo1", "b.js");
            theGraph.AddToCombination("combo1", "c.js");

            theGraph.AddToCombination("combo2", "a.js");
            theGraph.AddToCombination("combo2", "b.js");

            ClassUnderTest.Activate(new IPackageInfo[0], MockFor <IPackageLog>());
        }