I am trying to do some unit tests for a custom helper created to render the scripts included in a bundle.
My problem is I need to create a mock for BundleTable.Bundles object, but I didn't find any relevant way how I can achieve this.
My method looks like here:
public IEnumerable<string> GetBundleFilesCollection(string bundleUrl)
{
bundleUrl = string.Concat("~", bundleUrl);
var collection = new BundleCollection { BundleTable.Bundles.GetBundleFor(bundleUrl) };
var bundleResolver = new BundleResolver(collection);
IEnumerable<string> fileUrls = bundleResolver.GetBundleContents(bundleUrl);
return fileUrls;
}
Any ideas how I can achieve this?
I am using Rhino Mocks.