public void SettingsProvider_CanMapDateTime() { var dateTimeConfigProvider = new DbSettingsProvider<MySettingsWithDateTime>(Repository); var dateTimeSettings = new MySettingsWithDateTime() { DateTimeValue = DefaultDateTimeConfigValue }; dateTimeConfigProvider.Save(dateTimeSettings); var myOwnSettings = dateTimeConfigProvider.Load(); Assert.AreEqual(DefaultDateTimeConfigValue, myOwnSettings.DateTimeValue); }
public void SettingsProvider_CanMapIntegers() { var integerSettings = new MySettingsWithIntegers() { NumberValue = DefaultTestingIntergerSettingValueTwo }; var integerProvider = new DbSettingsProvider<MySettingsWithIntegers>(Repository); integerProvider.Save(integerSettings); var settings = integerProvider.Load(); Assert.AreEqual(DefaultTestingIntergerSettingValueTwo, settings.NumberValue); }
public void SettingsProvider_CanMapDouble() { var doubleTypeProvider = new DbSettingsProvider<MySettingsWithTypeDouble>(Repository); var myOwnSettings = new MySettingsWithTypeDouble { DoubleValue = DefaultDoubleConfigSetting }; doubleTypeProvider.Save(myOwnSettings); myOwnSettings = doubleTypeProvider.Load(); Assert.AreEqual(DefaultDoubleConfigSetting, myOwnSettings.DoubleValue); }