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."); } } }