mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 10:36:30 +01:00
45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
using System;
|
|
using NUnit.Framework;
|
|
using Serilog.Events;
|
|
using ShareeBike.Model.Services.CopriApi.ServerUris;
|
|
using ShareeBike.Settings;
|
|
using ShareeBike.ViewModel.Map;
|
|
using ShareeBike.ViewModel.Settings;
|
|
|
|
namespace SharedBusinessLogic.Tests.Fixtures.ObjectTests.SettingsNS
|
|
{
|
|
[TestFixture]
|
|
public class TestSettings
|
|
{
|
|
[Test]
|
|
public void TestConstructDefaults()
|
|
{
|
|
var settings = new ShareeBike.Model.Settings.Settings();
|
|
|
|
Assert.That(settings.MinimumLogEventLevel, Is.EqualTo(LogEventLevel.Information));
|
|
|
|
// Was GroupFilterHelper.GetSettingsFilterDefaults when used in ShareeBike- context.
|
|
Assert.That(settings.GroupFilterSettings, Is.EqualTo(new GroupFilterSettings()));
|
|
|
|
// Was GroupFilterHelper.GetMapPageFilterDefaults when used in ShareeBike- context.
|
|
Assert.That(settings.GroupFilterMapPage, Is.EqualTo(new GroupFilterMapPage()));
|
|
|
|
Assert.That(settings.ActiveUri, Is.EqualTo(new CopriServerUriList().ActiveUri));
|
|
|
|
Assert.That(settings.PollingParameters, Is.EqualTo(PollingParameters.Default));
|
|
|
|
Assert.That(
|
|
settings.CenterMapToCurrentLocation, Is.True,
|
|
"Center to map for sharee.bike because bt- locks require location info.");
|
|
}
|
|
|
|
[Test]
|
|
public void TestCtorCargo()
|
|
{
|
|
var settings = new ShareeBike.Model.Settings.Settings(activeUri: new Uri(CopriServerUriList.ShareeBike_LIVE));
|
|
Assert.That(
|
|
settings.CenterMapToCurrentLocation, Is.False,
|
|
"Do not center to current location for ShareeBike.");
|
|
}
|
|
}
|
|
}
|