public void CheckVariableBaseUrlSupport(string testFrontendBaseUrl) { // Assemble var builder = new OriginBuilder(testFrontendBaseUrl); // Assert var result = builder.GetOrigin(); // Act Assert.IsType <string>(result); }
public void ShouldNotEndWithEndpoint(string testFrontendBaseUrl) { // Assemble var builder = new OriginBuilder(testFrontendBaseUrl); // Assert var testUri = new Uri(testFrontendBaseUrl); var origin = builder.GetOrigin(); var result = origin.EndsWith(testUri.Host) || origin.EndsWith(testUri.Port.ToString()); // Act Assert.True(result); }
private string[] GetEnvOrigins() { // Swaggering via these urls if (_Environment.IsDevelopment()) { var originBuilder = new OriginBuilder(_Config.Url); return(new[] { originBuilder.GetOrigin() }); } return(new[] { "" }); // Denies Swagger on acceptatie and productie }