コード例 #1
0
ファイル: InputBuilder.cs プロジェクト: JonKruger/MvcContrib
        public static void BootStrap()
        {
            VirtualPathProvider pathProvider = new AssemblyResourceProvider();

            RegisterPathProvider(pathProvider);

            ViewEngines.Engines.Clear();
            ViewEngines.Engines.Add(new InputBuilderViewEngine(new string[] { "{1}", "Shared" }));
        }
コード例 #2
0
        public void Get_cache_dep_should_return_null_for_builders()
        {
            //arrange
            var provider = new AssemblyResourceProvider();

            //act
            var result = provider.GetCacheDependency("~/Views/InputBuilders/foo.aspx", new string[0], DateTime.Now);

            //assert
            Assert.IsNull(result);
        }
コード例 #3
0
        public void File_exists()
        {
            //arrange
            var provider = new AssemblyResourceProvider();

            //act
            var result = provider.FileExists("~/foo");

            //assert
            Assert.IsFalse(result);
        }
コード例 #4
0
        public void GetCacheKey_should_return_null()
        {
            //arrange
            var provider = new AssemblyResourceProvider();

            //act
            var result = provider.GetCacheKey("");

            //assert
            Assert.IsNull(result);
        }
コード例 #5
0
        public void App_resource_path_should_find_input_builders()
        {
            //arrange
            var provider = new AssemblyResourceProvider();

            //act
            var result = provider.IsAppResourcePath("~/Views/InputBuilders/String.aspx");

            //assert
            Assert.IsTrue(result);
        }