Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small tweaks #88

Merged
merged 4 commits into from
Jul 6, 2023
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
7 changes: 4 additions & 3 deletions src/BookmarkSync.Core/Configuration/ConfigManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public ConfigManager(
throw new InvalidConfigurationException();
}
}
public IConfiguration Configuration { get; set; }
public List<Instance>? Instances { get; set; }
public App App { get; set; }
private IConfiguration Configuration { get; }
public List<Instance>? Instances { get; }
public App App { get; }
public string GetConfigValue(string key)
{
_logger.Debug("Running {Method} for key: {Key}", "GetConfigValue", key);
Expand All @@ -44,5 +44,6 @@ public string GetConfigValue(string key)
public void SaveToFile()
{
Console.WriteLine(Directory.GetCurrentDirectory());
throw new NotImplementedException();
}
}
2 changes: 1 addition & 1 deletion src/BookmarkSync.Core/Meta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace BookmarkSync.Core;

public static class Meta
{
public const string
private const string
Name = "mastodon-bookmark-sync",
Version = "2.0";
public static readonly ProductInfoHeaderValue UserAgent = new(Name, Version);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ public void Init()
public void ConfigManager_HasProperties()
{
// Assert
Assert.AreEqual(3, _configManager?.PropertyCount());
Assert.IsTrue(_configManager?.HasProperty("Configuration"));
Assert.AreEqual(2, _configManager?.PropertyCount());
Assert.IsTrue(_configManager?.HasProperty("Instances"));
Assert.IsTrue(_configManager?.HasProperty("App"));

Expand Down