Inheritance: System.Web.Hosting.VirtualFile
Ejemplo n.º 1
0
        public void The_file_should_not_locate_an_invalid_path()
        {
            //arrange
            var file = new AssemblyResourceVirtualFile("~/foo", new AssemblyResource() { Namespace = "MvcContrib.UI.InputBuilder.", TypeToLocateAssembly = typeof(AssemblyResourceProvider) });

            //act
            var result = file.Open();

            //assert
            Assert.IsNull(result);
        }
Ejemplo n.º 2
0
        public void The_file_should_not_locate_an_invalid_path()
        {
            //arrange
            var file = new AssemblyResourceVirtualFile("~/foo");

            //act
            var result = file.Open();

            //assert
            Assert.IsNull(result);
        }
Ejemplo n.º 3
0
        public void The_file_should_locate_a_embedded_resource()
        {
            //arrange
            var file = new AssemblyResourceVirtualFile("~/Views/InputBuilders/String.aspx");

            //act
            var result = file.Open();

            //assert
            Assert.IsNotNull(result);
        }
Ejemplo n.º 4
0
        public void The_file_should_locate_a_embedded_resource()
        {
            //arrange
            var resourceStore = new AssemblyResourceStore(typeof(AssemblyResourceProvider), "", "MvcContrib.UI.InputBuilder");
            var file = new AssemblyResourceVirtualFile("~/Views/InputBuilders/String.aspx", resourceStore);

            //act
            var result = file.Open();

            //assert
            Assert.IsNotNull(result);
        }
Ejemplo n.º 5
0
        public void The_file_should_not_locate_an_invalid_path()
        {
            //arrange
            var resourceStore = new AssemblyResourceStore(typeof(AssemblyResourceProvider), "", "MvcContrib.UI.InputBuilder");

            var file = new AssemblyResourceVirtualFile("~/foo", resourceStore);

            //act
            var result = file.Open();

            //assert
            Assert.IsNull(result);
        }
Ejemplo n.º 6
0
        public void The_file_should_locate_a_embedded_resource()
        {
            //arrange
            var file = new AssemblyResourceVirtualFile("~/Views/InputBuilders/String.aspx", new AssemblyResource()
            {
                Namespace = "MvcContrib.UI.InputBuilder",
                TypeToLocateAssembly = typeof(AssemblyResourceProvider),
                VirtualPath = ""
            });

            //act
            var result = file.Open();

            //assert
            Assert.IsNotNull(result);
        }