public void CheckVariableBaseUrlSupport(string testFrontendBaseUrl) { // Assemble var builder = new OriginBuilder(testFrontendBaseUrl); // Assert var result = builder.getOrigin(); // Act Assert.IsType <string>(result); }
public void CheckVariableBaseUrlSupport(string testFrontendBaseUrl) { // Assemble var builder = new OriginBuilder(testFrontendBaseUrl); // Assert var result = builder.getOrigin(); var expected = typeof(string); // Act Assert.IsInstanceOfType(result, expected); }
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 }
private string[] GetOrigins() { var origin = new OriginBuilder(_iccPortalConfig.FrontendBaseUrl).GetOrigin(); return(new[] { origin }); }