예제 #1
0
            public void InitializesFileSystem()
            {
                // Arrange
                IFileSystem expected = new PhysicalFileSystem(@"C:\");

                // Act
                var router = new DefaultRouter(expected);

                // Assert
                Assert.Same(expected, router.FileSystem);
            }
예제 #2
0
            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());
            }
예제 #3
0
 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;
 }