public ScriptBundleDeserializer_Tests() { element = new XElement("ScriptBundle", new XAttribute("Path", "~"), new XAttribute("Hash", "010203"), new XAttribute("Condition", "expected-condition"), new XAttribute("ContentType", "text/javascript"), new XAttribute("PageLocation", "PAGE-LOCATION"), new XAttribute("Renderer", typeof(ScriptBundleHtmlRenderer).AssemblyQualifiedName), new XElement("Asset", new XAttribute("Path", "~/asset-1"), new XAttribute("AssetCacheValidatorType", typeof(FileAssetCacheValidator).FullName)), new XElement("Asset", new XAttribute("Path", "~/asset-2"), new XAttribute("AssetCacheValidatorType", typeof(FileAssetCacheValidator).FullName)), new XElement("Reference", new XAttribute("Path", "~/reference-1")), new XElement("Reference", new XAttribute("Path", "~/reference-2")), new XElement( "HtmlAttribute", new XAttribute("Name", "type"), new XAttribute("Value", "text/javascript") ), new XElement( "HtmlAttribute", new XAttribute("Name", "attribute1"), new XAttribute("Value", "value1") ), new XElement( "HtmlAttribute", new XAttribute("Name", "attribute2"), new XAttribute("Value", "value2") ) ); directory = new FakeFileSystem { { "~/script/010203.js", "CONTENT" } }; var container = new TinyIoCContainer(); container.Register(Mock.Of<IUrlGenerator>()); deserializer = new ScriptBundleDeserializer(container); DeserializeBundle(); }
public ScriptBundleDeserializer_Tests() { element = new XElement("ScriptBundle", new XAttribute("Path", "~"), new XAttribute("Hash", "010203"), new XAttribute("Condition", "expected-condition"), new XAttribute("ContentType", "text/javascript"), new XAttribute("PageLocation", "PAGE-LOCATION"), new XElement("Asset", new XAttribute("Path", "~/asset-1"), new XAttribute("AssetCacheValidatorType", typeof(FileAssetCacheValidator).FullName)), new XElement("Asset", new XAttribute("Path", "~/asset-2"), new XAttribute("AssetCacheValidatorType", typeof(FileAssetCacheValidator).FullName)), new XElement("Reference", new XAttribute("Path", "~/reference-1")), new XElement("Reference", new XAttribute("Path", "~/reference-2")), new XElement( "HtmlAttribute", new XAttribute("Name", "type"), new XAttribute("Value", "text/javascript") ), new XElement( "HtmlAttribute", new XAttribute("Name", "attribute1"), new XAttribute("Value", "value1") ), new XElement( "HtmlAttribute", new XAttribute("Name", "attribute2"), new XAttribute("Value", "value2") ) ); directory = new FakeFileSystem { { "~/script/010203.js", "CONTENT" } }; var urlModifier = new VirtualDirectoryPrepender("/"); deserializer = new ScriptBundleDeserializer(urlModifier); DeserializeBundle(); }