本文整理汇总了C#中TestableBundle.Process方法的典型用法代码示例。如果您正苦于以下问题:C# TestableBundle.Process方法的具体用法?C# TestableBundle.Process怎么用?C# TestableBundle.Process使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestableBundle
的用法示例。
在下文中一共展示了TestableBundle.Process方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetupTestBundle
protected void SetupTestBundle()
{
var bundle = new TestableBundle("~/test");
var asset = new StubAsset("~/asset.js", "asset-content");
bundle.Assets.Add(asset);
bundle.Hash = new byte[] { 1, 2, 3 };
bundles.Add(bundle);
bundles.BuildReferences();
bundle.Process(new CassetteSettings());
}
示例2: GivenBundleExists_WhenProcessRequest
public GivenBundleExists_WhenProcessRequest()
{
var bundle = new TestableBundle("~/test") { ContentType = "expected-content-type" };
var asset = new StubAsset("~/asset.js", "asset-content");
bundle.Hash = new byte[] { 1, 2, 3 };
bundle.Assets.Add(asset);
bundles.Add(bundle);
bundles.BuildReferences();
bundle.Process(new CassetteSettings());
var handler = CreateRequestHandler();
handler.ProcessRequest("~/test");
}
示例3: GivenBundleExists_WhenProcessRequest
public GivenBundleExists_WhenProcessRequest()
{
var bundle = new TestableBundle("~/test") { ContentType = "expected-content-type" };
var asset = new Mock<IAsset>();
asset.Setup(a => a.OpenStream())
.Returns(() => "asset-content".AsStream());
bundle.Hash = new byte[] { 1, 2, 3 };
bundle.Assets.Add(asset.Object);
application.Setup(c => c.FindBundleContainingPath<TestableBundle>("~/test"))
.Returns(bundle);
bundle.Process(new CassetteSettings(""));
var handler = CreateRequestHandler("test_010203");
handler.ProcessRequest();
}
示例4: SetupTestBundle
protected void SetupTestBundle()
{
var bundle = new TestableBundle("~/test");
var asset = new Mock<IAsset>();
asset.Setup(a => a.OpenStream())
.Returns(() => "asset-content".AsStream());
asset.SetupGet(a => a.Hash).Returns(new byte[] { 1, 2, 3 });
bundle.Assets.Add(asset.Object);
bundle.Hash = new byte[] { 1, 2, 3 };
application.Setup(c => c.FindBundleContainingPath<TestableBundle>("~/test"))
.Returns(bundle);
bundle.Process(new CassetteSettings(""));
}