public WebAssetTests() { checker = new Mock<IWebAssetChecker>(); serializer = new Mock<IWebAssetGroupSerializer>(); resolverFactory = new Mock<IWebAssetResolverFactory>(); asset = new WebAsset("~/Script/content1.js"); }
private bool AlreadyExists(IWebAsset item) { WebAsset assetItem = item as WebAsset; WebAssetGroup assetItemGroup = item as WebAssetGroup; if (assetItem != null) { return(AssetItems.Any(i => i != item && i.Source.IsCaseInsensitiveEqual(assetItem.Source))); } if (assetItemGroup != null) { return(AssetGroups.Any(i => i != item && i.Name.IsCaseInsensitiveEqual(assetItemGroup.Name))); } return(false); }