public void InitializesFileSystem() { // Arrange IFileSystem expected = new PhysicalFileSystem(@"C:\"); // Act var router = new DefaultRouter(expected); // Assert Assert.Same(expected, router.FileSystem); }
public void HasBuiltInDefaultDocumentAndKnownExtensions() { // Act var router = new DefaultRouter(new PhysicalFileSystem(@"C:\")); // Assert Assert.Equal( new[] { ".cshtml" }, router.KnownExtensions.ToArray()); Assert.Equal( new[] { "Default", "Index" }, router.DefaultDocumentNames.ToArray()); }
public TestableEdgeApplication(AppFunc next, string virtualRoot) : base(next) { VirtualRoot = virtualRoot; FileSystem = TestFileSystem = new TestFileSystem(@"C:\Test"); Router = new DefaultRouter(TestFileSystem); CompilationManager = (MockCompilationManager = new Mock<ICompilationManager>()).Object; Activator = (MockActivator = new Mock<IPageActivator>()).Object; Executor = (MockExecutor = new Mock<IPageExecutor>()).Object; Tracer = NullTraceFactory.Instance; }