Example #1
0
 public void UriSectionIdnIriParsing()
 {
     using (var temp = new TempConfig(PlatformDetection.IsFullFramework ? UriSectionConfiguration_NetFX : UriSectionConfiguration_Core))
     {
         var        config     = ConfigurationManager.OpenExeConfiguration(temp.ExePath);
         UriSection uriSection = (UriSection)config.GetSection("uri");
         Assert.Equal(UriIdnScope.All, uriSection.Idn.Enabled);
         Assert.Equal(true, uriSection.IriParsing.Enabled);
     }
 }
Example #2
0
 public void UriSectionIdnIriParsing()
 {
     using (var temp = new TempConfig(UriSectionConfiguration))
     {
         var        config     = ConfigurationManager.OpenExeConfiguration(temp.ExePath);
         UriSection uriSection = (UriSection)config.GetSection("uri");
         Assert.Equal(UriIdnScope.All, uriSection.Idn.Enabled);
         Assert.Equal(true, uriSection.IriParsing.Enabled);
     }
 }
Example #3
0
 public void UriSectionSchemeSettings()
 {
     using (var temp = new TempConfig(PlatformDetection.IsFullFramework ? UriSectionConfiguration_NetFX : UriSectionConfiguration_Core))
     {
         var        config     = ConfigurationManager.OpenExeConfiguration(temp.ExePath);
         UriSection uriSection = (UriSection)config.GetSection("uri");
         Assert.Equal(1, uriSection.SchemeSettings.Count);
         SchemeSettingElement schemeSettingElement = uriSection.SchemeSettings[0];
         Assert.Equal("ftp", schemeSettingElement.Name);
         Assert.Equal(GenericUriParserOptions.DontCompressPath, schemeSettingElement.GenericUriParserOptions);
     }
 }