Skip to content

Commit

Permalink
[tests] Refactor ConfigTest to not call Assembly.Location.
Browse files Browse the repository at this point in the history
  • Loading branch information
Git History Editor authored and rolfbjarne committed Jun 12, 2023
1 parent d25d353 commit fa8594e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/monotouch-test/mono/ConfigTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public partial class ConfigTest {
[Test]
public void Existence ()
{
var config_file = Assembly.GetExecutingAssembly ().Location + ".config";
Assert.True (File.Exists (config_file), "existence");
var config_file = Path.Combine (AppContext.BaseDirectory, Assembly.GetExecutingAssembly ().GetName ().Name + ".dll.config");
Assert.That (config_file, Does.Exist, "existence");
Assert.That (File.ReadAllText (config_file), Contains.Substring ("<secretMessage>Xamarin rocks</secretMessage>"), "content");
}
}
Expand Down

0 comments on commit fa8594e

Please sign in to comment.