string Render() { bundle.Renderer = fallbackRenderer.Object; bundle.Process(settings); var renderer = new ExternalStylesheetBundle.ExternalStylesheetBundleRenderer(settings); return(renderer.Render(bundle)); }
public void ProcessCallsProcessor() { var bundle = new ExternalStylesheetBundle("http://test.com/asset.css"); var pipeline = new Mock<IBundlePipeline<StylesheetBundle>>(); bundle.Pipeline = pipeline.Object; bundle.Process(new CassetteSettings()); pipeline.Verify(p => p.Process(bundle)); }
public void ProcessCallsProcessor() { var bundle = new ExternalStylesheetBundle("http://test.com/asset.css"); var processor = new Mock<IBundleProcessor<StylesheetBundle>>(); bundle.Processor = processor.Object; bundle.Process(new CassetteSettings("")); processor.Verify(p => p.Process(bundle, It.IsAny<CassetteSettings>())); }
public void ProcessCallsProcessor() { var bundle = new ExternalStylesheetBundle("http://test.com/asset.css"); var processor = new Mock <IBundleProcessor <StylesheetBundle> >(); bundle.Processor = processor.Object; bundle.Process(new CassetteSettings("")); processor.Verify(p => p.Process(bundle, It.IsAny <CassetteSettings>())); }
public void ProcessCallsProcessor() { var bundle = new ExternalStylesheetBundle("http://test.com/asset.css"); var pipeline = new Mock <IBundlePipeline <StylesheetBundle> >(); bundle.Pipeline = pipeline.Object; bundle.Process(new CassetteSettings()); pipeline.Verify(p => p.Process(bundle)); }
public void RenderUsesRenderer() { var bundle = new ExternalStylesheetBundle("http://test.com/asset.css"); var urlGenerator = new Mock <IUrlGenerator>(); urlGenerator.Setup(g => g.CreateBundleUrl(bundle)).Returns("/"); var settings = new CassetteSettings("") { UrlGenerator = urlGenerator.Object }; bundle.Process(settings); var html = bundle.Render(); html.ShouldContain(bundle.Url); }
public void GivenMediaNotEmpty_RenderReturnsHtmlLinkElementWithMediaAttribute() { var bundle = new ExternalStylesheetBundle("http://test.com/asset.css") { Media = "print" }; var urlGenerator = new Mock<IUrlGenerator>(); urlGenerator.Setup(g => g.CreateBundleUrl(bundle)).Returns("/"); var settings = new CassetteSettings("") { UrlGenerator = urlGenerator.Object }; bundle.Process(settings); var html = bundle.Render(); html.ShouldContain(bundle.Url); html.ShouldContain("media=\"print\""); }
public void GivenMediaNotEmpty_RenderReturnsHtmlLinkElementWithMediaAttribute() { var bundle = new ExternalStylesheetBundle("http://test.com/asset.css") { Media = "print" }; var urlGenerator = new Mock <IUrlGenerator>(); urlGenerator.Setup(g => g.CreateBundleUrl(bundle)).Returns("/"); var settings = new CassetteSettings("") { UrlGenerator = urlGenerator.Object }; bundle.Process(settings); var html = bundle.Render(); html.ShouldContain(bundle.Url); html.ShouldContain("media=\"print\""); }
public void RenderUsesRenderer() { var bundle = new ExternalStylesheetBundle("http://test.com/asset.css"); var urlGenerator = new Mock<IUrlGenerator>(); urlGenerator.Setup(g => g.CreateBundleUrl(bundle)).Returns("/"); var settings = new CassetteSettings("") { UrlGenerator = urlGenerator.Object }; bundle.Process(settings); var html = bundle.Render(); html.ShouldContain(bundle.Url); }
string Render() { bundle.Process(settings); bundle.FallbackRenderer = fallbackRenderer.Object; return(bundle.Render()); }