Exemplo n.º 1
0
                public void ConfiguresSpecifiedEdgeApp()
                {
                    // Arrange
                    TestAppBuilder builder = new TestAppBuilder();
                    var app = CreateEdgeApp();

                    // Act
                    builder.UseEdge(app);

                    // Assert
                    Delegate del = builder.MiddlewareStack.Single();
                    Assert.Equal(TheStartMethod, del.Method);
                    Assert.Same(app, del.Target);
                }
Exemplo n.º 2
0
                public void ConfiguresEdgeAppForCurrentDirectoryAtRootVirtualPath()
                {
                    // Arrange
                    TestAppBuilder builder = new TestAppBuilder();

                    // Act
                    builder.UseEdge();

                    // Assert
                    AssertEdgeApplication(builder.MiddlewareStack.Single());
                }
Exemplo n.º 3
0
                public void ConfiguresEdgeAppForSpecifiedDirectoryAtRootVirtualPath()
                {
                    // Arrange
                    TestAppBuilder builder = new TestAppBuilder();

                    // Act
                    builder.UseEdge("Foo");

                    // Assert
                    AssertEdgeApplication(builder.MiddlewareStack.Single(), "/", new PhysicalFileSystem("Foo"));
                }
Exemplo n.º 4
0
                public void ConfiguresEdgeAppForSpecifiedFileSystemAtSpecifiedVirtualPath()
                {
                    // Arrange
                    TestAppBuilder builder = new TestAppBuilder();

                    // Act
                    builder.UseEdge(new PhysicalFileSystem(@"C:\Blarg"), "Bar");

                    // Assert
                    AssertEdgeApplication(builder.MiddlewareStack.Single(), "Bar", new PhysicalFileSystem(@"C:\Blarg"));
                }