Example #1
0
        public void NonexistentResourceReturnsNull()
        {
            var location = new AssemblyResourceLocation(this.GetType().Assembly, this.GetType().Namespace);
            var resource = location.GetResource(new VirtualPath("~/this.does.not.exist"));

            Assert.IsNull(resource);
        }
Example #2
0
        public void CanGetResourceWithinPath()
        {
            var location = new AssemblyResourceLocation(this.GetType().Assembly, this.GetType().Namespace);
            var resource = location.GetResource(new VirtualPath("~/" + resourceName));

            Assert.IsNotNull(resource);
            Assert.True(resource.Exists);
        }