Version 3.0.346

This commit is contained in:
Oliver Hauff 2022-10-17 18:45:38 +02:00
parent 1ba809dd59
commit 47c03f43fb
43 changed files with 609 additions and 117 deletions

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using NUnit.Framework;
@ -172,5 +172,31 @@ namespace TestTINKLib.Model.Settings
settings["Theme"],
Is.EqualTo(JsonConvert.SerializeObject(typeof(TINK.Themes.Konrad).Name)));
}
[Test]
public void TestGetStartupSettingsStartupPage() => Assert.That(
JsonSettingsDictionary.GetStartupSettings(new Dictionary<string, string> {
{
"StartupSettings",
JsonConvert.SerializeObject(new StartupSettings { StartupPage = TINK.ViewTypes.ContactPage})
}
}).StartupPage,
Is.EqualTo(TINK.ViewTypes.ContactPage));
[Test]
public void TestSetStartupSettingsStartupPage()
{
var settings = JsonSettingsDictionary.SetStartupSettings(
new Dictionary<string, string>(),
new StartupSettings { StartupPage = TINK.ViewTypes.ContactPage });
Assert.That(
settings,
Contains.Key("StartupSettings"));
Assert.That(
settings["StartupSettings"],
Is.EqualTo(JsonConvert.SerializeObject(new StartupSettings { StartupPage = TINK.ViewTypes.ContactPage })));
}
}
}