public void SelectScheme_ReturnsTheDefaultScheme_ForOtherPaths(string path) { // Arrange var selector = new IdentityServerJwtPolicySchemeForwardSelector("/Identity", "Local"); var ctx = new DefaultHttpContext(); ctx.Request.Path = path; // Act var scheme = selector.SelectScheme(ctx); // Assert Assert.Equal("Local", scheme); }
public void SelectScheme_ReturnsTheIdentityApplicationScheme_ForIdentityRelatedPaths(string path) { // Arrange var selector = new IdentityServerJwtPolicySchemeForwardSelector("/Identity", "Local"); var ctx = new DefaultHttpContext(); ctx.Request.Path = path; // Act var scheme = selector.SelectScheme(ctx); // Assert Assert.Equal(IdentityConstants.ApplicationScheme, scheme); }