mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 18:46:30 +01:00
45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
using System;
|
|
using NUnit.Framework;
|
|
using Serilog.Events;
|
|
using TINK.Model.Services.CopriApi.ServerUris;
|
|
using TINK.Settings;
|
|
using TINK.ViewModel.Map;
|
|
using TINK.ViewModel.Settings;
|
|
|
|
namespace TestTINKLib.Fixtures.ObjectTests.Settings
|
|
{
|
|
[TestFixture]
|
|
public class TestSettings
|
|
{
|
|
[Test]
|
|
public void TestConstructDefaults()
|
|
{
|
|
var settings = new TINK.Model.Settings.Settings();
|
|
|
|
Assert.AreEqual(LogEventLevel.Error, settings.MinimumLogEventLevel);
|
|
|
|
// Was GroupFilterHelper.GetSettingsFilterDefaults when used in TINK- context.
|
|
Assert.AreEqual(new GroupFilterSettings(), settings.GroupFilterSettings);
|
|
|
|
// Was GroupFilterHelper.GetMapPageFilterDefaults when used in TINK- context.
|
|
Assert.AreEqual(new GroupFilterMapPage(), settings.GroupFilterMapPage);
|
|
|
|
Assert.AreEqual(new CopriServerUriList().ActiveUri, settings.ActiveUri);
|
|
|
|
Assert.AreEqual(PollingParameters.Default, settings.PollingParameters);
|
|
|
|
Assert.IsTrue(
|
|
settings.CenterMapToCurrentLocation,
|
|
"Center to map for sharee.bike because bt- locks require location info.");
|
|
}
|
|
|
|
[Test]
|
|
public void TestCtorTink()
|
|
{
|
|
var settings = new TINK.Model.Settings.Settings(activeUri: new Uri(CopriServerUriList.TINK_LIVE));
|
|
Assert.IsFalse(
|
|
settings.CenterMapToCurrentLocation,
|
|
"Do not center to current location for TINK.");
|
|
}
|
|
}
|
|
}
|