public void ByPassTest() { XmlSerializer serializer = new XmlSerializer(typeof(PathMap)); PathMap mapping = (PathMap)serializer.Deserialize( new System.IO.StreamReader( @"MappingTest\Mapping.xml")); ApplicationDirectory zmrres = (ApplicationDirectory)mapping.GetDirectory("/zmrres"); Assert.IsTrue(zmrres.ByPass("someStylesheet.css")); Assert.IsTrue(zmrres.ByPass("someStylesheet.css?somQueryPar")); Assert.IsFalse(zmrres.ByPass("anUrlwithcsswithin.txt")); Assert.IsFalse(zmrres.ByPass("anUrlwith.csswithin.txt")); Assert.IsTrue(zmrres.ByPass("(/images/somePicture.png")); }
public bool ByPass(string url) { return(_applicationDirectory.ByPass(url)); }