Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Fix the remaining System.ConfigManager tests. #21006

Merged
merged 2 commits into from
Jun 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public void EditBeforeAdd()
}

[Fact]
[ActiveIssue(21000, TargetFrameworkMonikers.UapAot)]
public void EditAfterAdd()
{
Config cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,16 @@ public static string ThisApplicationPath
{
get
{
var asm = Assembly.GetEntryAssembly();
return asm.Location;
return Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
Assembly.GetEntryAssembly().ManifestModule.Name);
}
}

public static string ThisConfigFileName
{
get
{
var exe = Path.GetFileName(ThisApplicationPath);
return exe + ".config";
return Assembly.GetEntryAssembly().ManifestModule.Name + ".config";
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ private class ReadOnlySimpleCollection : SimpleCollection
}

[Fact]
[ActiveIssue(21004, TargetFrameworkMonikers.UapAot)]
public void NullComparerThrows()
{
Assert.Equal("comparer", Assert.Throws<ArgumentNullException>(() => new SimpleCollection(null)).ParamName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public void EmptySectionGroup()

[Fact]
[ActiveIssue("dotnet/corefx #19383", TargetFrameworkMonikers.NetFramework)]
[ActiveIssue(21000, TargetFrameworkMonikers.UapAot)]
public void SimpleSectionGroup()
{
using (var temp = new TempConfig(SimpleSectionGroupConfiguration))
Expand All @@ -67,4 +68,4 @@ public void SimpleSectionGroup()
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public void MinValue_Get()
}

[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot,"Exception messages are different")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just take out the Assert.Equal(expectedException.Message, result.Message) in both cases instead? Then the rest of the test runs.

Although, i thought that the exception message would be blank for both cases, so it would be equal anyway,.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally we don't look at exception messages so it's better to just fix the test that way

public void MinValueString_TooSmall()
{
TimeSpanValidatorAttribute attribute = new TimeSpanValidatorAttribute();
Expand All @@ -122,6 +123,7 @@ public void MinValueString_TooSmall()
}

[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception messages are different")]
public void MaxValueString_TooBig()
{
TimeSpanValidatorAttribute attribute = new TimeSpanValidatorAttribute();
Expand All @@ -132,4 +134,4 @@ public void MaxValueString_TooBig()
Assert.Equal(expectedException.Message, result.Message);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class UriSectionTests
</configuration>";

[Fact]
[ActiveIssue(21000, TargetFrameworkMonikers.UapAot)]
public void UriSectionIdnIriParsing()
{
using (var temp = new TempConfig(PlatformDetection.IsFullFramework ? UriSectionConfiguration_NetFX : UriSectionConfiguration_Core))
Expand All @@ -51,6 +52,7 @@ public void UriSectionIdnIriParsing()
}

[Fact]
[ActiveIssue(21000, TargetFrameworkMonikers.UapAot)]
public void UriSectionSchemeSettings()
{
using (var temp = new TempConfig(PlatformDetection.IsFullFramework ? UriSectionConfiguration_NetFX : UriSectionConfiguration_Core))
Expand All @@ -64,4 +66,4 @@ public void UriSectionSchemeSettings()
}
}
}
}
}