ScriptBundle StubBundle() { var bundle = new ScriptBundle("~"); bundle.Assets.Add(StubAsset("~/test.js")); bundle.Process(new CassetteSettings("")); return bundle; }
ScriptBundle StubBundle() { var bundle = new ScriptBundle("~") { Processor = new ScriptPipeline() }; var asset = new StubAsset(fullPath: "~/test.js"); asset.References.Add(new AssetReference("http://example.org/", asset, 1, AssetReferenceType.Url)); bundle.Assets.Add(asset); bundle.Process(new CassetteSettings("")); var urlModifier = Mock.Of<IUrlModifier>(); bundle.Renderer = new ConstantHtmlRenderer<ScriptBundle>("", urlModifier); return bundle; }