IsApplicationInsightsUrl() private method

Determines whether an URL is application insights URL.
private IsApplicationInsightsUrl ( string url ) : bool
url string HTTP URL.
return bool
 public void IsApplicationInsightsUrlReturnsFalseForNullOrEmptyUrl()
 {
     using (TelemetryConfiguration configuration = this.CreateStubTelemetryConfiguration())
     {
         string url = null;
         ApplicationInsightsUrlFilter urlFilter = new ApplicationInsightsUrlFilter(configuration);
         Assert.IsFalse(urlFilter.IsApplicationInsightsUrl(url));
         url = string.Empty;
         Assert.IsFalse(urlFilter.IsApplicationInsightsUrl(url));
     }
 }
Esempio n. 2
0
 public void IsApplicationInsightsUrlReturnsFalseForNullOrEmptyUrl()
 {
     using (TelemetryConfiguration configuration = this.CreateStubTelemetryConfiguration())
     {
         string url = null;
         ApplicationInsightsUrlFilter urlFilter = new ApplicationInsightsUrlFilter(configuration);
         Assert.IsFalse(urlFilter.IsApplicationInsightsUrl(url));
         url = string.Empty;
         Assert.IsFalse(urlFilter.IsApplicationInsightsUrl(url));
     }
 }
 public void IsApplicationInsightsUrlReturnsTrueForTelemetryChannelEndpointAddress()
 {
     using (TelemetryConfiguration configuration = this.CreateStubTelemetryConfiguration())
     {    
         string url = "https://endpointaddress";
         ApplicationInsightsUrlFilter urlFilter = new ApplicationInsightsUrlFilter(configuration);
         Assert.IsTrue(urlFilter.IsApplicationInsightsUrl(url));
     }
 }
 public void IsApplicationInsightsUrlReturnsTrueForTelemetryServiceEndpoint()
 {
     using (TelemetryConfiguration configuration = this.CreateStubTelemetryConfiguration())
     {               
         string url = "https://dc.services.visualstudio.com/v2/track";
         ApplicationInsightsUrlFilter urlFilter = new ApplicationInsightsUrlFilter(configuration);
         Assert.IsTrue(urlFilter.IsApplicationInsightsUrl(url));
     }
 }
Esempio n. 5
0
 public void IsApplicationInsightsUrlReturnsTrueForTelemetryChannelEndpointAddress()
 {
     using (TelemetryConfiguration configuration = this.CreateStubTelemetryConfiguration())
     {
         string url = "https://endpointaddress";
         ApplicationInsightsUrlFilter urlFilter = new ApplicationInsightsUrlFilter(configuration);
         Assert.IsTrue(urlFilter.IsApplicationInsightsUrl(url));
     }
 }
Esempio n. 6
0
 public void IsApplicationInsightsUrlReturnsTrueForQuickPulseServiceEndpoint()
 {
     using (TelemetryConfiguration configuration = this.CreateStubTelemetryConfiguration())
     {
         string url = "https://rt.services.visualstudio.com/QuickPulseService.svc";
         ApplicationInsightsUrlFilter urlFilter = new ApplicationInsightsUrlFilter(configuration);
         Assert.IsTrue(urlFilter.IsApplicationInsightsUrl(url));
     }
 }