/// <summary>Initializes the file system.</summary>
        ///
        /// <param name="fileSystem">The file system.</param>
        protected override void InitializeFileSystem(InMemoryVirtualPathProvider fileSystem)
        {
            base.InitializeFileSystem(fileSystem);

            fileSystem.AddFile("/views/v1.cshtml", View1Html);
            fileSystem.AddFile("/views/v2.cshtml", View2Html);
            fileSystem.AddFile("/views/v3.cshtml", View3Html);
        }
Beispiel #2
0
        public void OnBeforeEachTest()
        {
            RazorFormat.Instance = null;

            var fileSystem = new InMemoryVirtualPathProvider(new BasicAppHost());
            fileSystem.AddFile("/views/TheLayout.cshtml", LayoutHtml);
            InitializeFileSystem(fileSystem);

            RazorFormat = new RazorFormat
            {
                VirtualPathProvider = fileSystem,
                PageBaseType = typeof (CustomRazorBasePage<>),
                EnableLiveReload = false,
                PrecompilePages = PrecompileEnabled,
                WaitForPrecompilationOnStartup = WaitForPrecompileEnabled,
            }.Init();
        }