Skip to content

Commit

Permalink
Merge pull request #102 from prplecake/jsonString-test-configs
Browse files Browse the repository at this point in the history
  • Loading branch information
prplecake authored Aug 13, 2023
2 parents ee3031c + f4d9ba4 commit dde1a06
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions tests/BookmarkSync.Core.Tests/Configuration/ConfigManagerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ public class ConfigManagerTests
[TestInitialize]
public void Init()
{
var inMemoryConfig = new Dictionary<string, string?>
var jsonString = @"
{
""App"": {
""Bookmarking"": {
""Service"": ""Pinboard""
}
},
""Instances"": [
{
{
"App:Bookmarking:Service", "Pinboard"
},
{
"Instances:0:Uri", "https://compostintraining.club"
}
};
""Uri"": ""https://compostintraining.club""
}
]
}";
_config = new ConfigurationBuilder()
.AddInMemoryCollection(inMemoryConfig)
.AddJsonStream(new MemoryStream(Encoding.UTF8.GetBytes(jsonString)))
.Build();

_configManager = new ConfigManager(_config);
Expand Down Expand Up @@ -78,7 +82,9 @@ public void TestConfigManagerWithIgnoredAccountsConfigured()
],
},
""Instances"": [
""https://compostintraining.club""
{
""Uri"": ""https://compostintraining.club""
}
]
}";
var config = new ConfigurationBuilder()
Expand Down

0 comments on commit dde1a06

Please sign in to comment.