| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using Quadarax.Application.QLiberace.Common.Settings;
- namespace Quadarax.Application.QLiberace.Common.Tests.Settings.Fakes
- {
- internal class ModuleSettingFake : ModuleSetting
- {
- public const string DefPropertyString1 = "test1";
- public const string? DefPropertyString2 = null;
- public const string DefPropertyDateTime1String = "12.3.2022 13:02:54";
- public const string? DefPropertyDateTime2String = null;
- public const string DefPropertyTimeSpanString = "00:00:35";
- public const int DefPropertyInt = 35;
- public const bool DefPropertyBool = true;
- public string PropertyString1 { get; set; }
- public string? PropertyString2 { get; set; }
- public DateTime PropertyDateTime1 { get; set; }
- public DateTime? PropertyDateTime2 { get; set; }
- public TimeSpan? PropertyTimeSpan { get; set; }
- public int? PropertyInt { get; set; }
- public bool PropertyBool { get; set; }
- public ModuleSettingFake()
- {
- PropertyString1 = string.Empty;
- Reset();
- }
- private void Reset()
- {
- PropertyString1 = DefPropertyString1;
- PropertyString2 = DefPropertyString2;
- PropertyDateTime1 = DateTime.Parse(DefPropertyDateTime1String);
- PropertyDateTime2 = string.IsNullOrEmpty(DefPropertyDateTime2String)
- ? (DateTime?)null
- : DateTime.Parse(DefPropertyDateTime2String!);
- PropertyTimeSpan = string.IsNullOrEmpty(DefPropertyTimeSpanString)
- ? (TimeSpan?)null
- : TimeSpan.Parse(DefPropertyTimeSpanString);
- PropertyInt = DefPropertyInt;
- PropertyBool = DefPropertyBool;
- }
- }
- }
|