| 123456789101112131415161718192021222324252627282930313233343536373839 |
- using Quadarax.Application.QLiberace.Common.Tests.Settings.Fakes;
- namespace Quadarax.Application.QLiberace.Common.Tests.Settings
- {
- public class ModuleSettingsTest
- {
- private ModuleSettingFake _setting;
- [SetUp]
- public void Setup()
- {
- _setting = new ModuleSettingFake();
- }
- [Test]
- public void GetData()
- {
- //TODO: fix test
- var data = _setting.GetData().ToArray();
- Assert.That(data.Length, Is.EqualTo(7));
- CollectionAssert.Contains(data,new Tuple<string, string, object?>("PropertyString1", string.Empty, ModuleSettingFake.DefPropertyString1));
- CollectionAssert.Contains(data,new Tuple<string, string, object?>("PropertyString2", string.Empty, ModuleSettingFake.DefPropertyString2));
- CollectionAssert.Contains(data,new Tuple<string, string, object?>("PropertyDateTime1", string.Empty, string.IsNullOrEmpty(ModuleSettingFake.DefPropertyDateTime1String)
- ? (DateTime?)null
- : DateTime.Parse(ModuleSettingFake.DefPropertyDateTime1String!)));
- CollectionAssert.Contains(data,new Tuple<string, string, object?>("PropertyDateTime2", string.Empty, string.IsNullOrEmpty(ModuleSettingFake.DefPropertyDateTime2String)
- ? (DateTime?)null
- : DateTime.Parse(ModuleSettingFake.DefPropertyDateTime2String!)));
- CollectionAssert.Contains(data,new Tuple<string, string, object?>("PropertyTimeSpan", string.Empty, string.IsNullOrEmpty(ModuleSettingFake.DefPropertyTimeSpanString)
- ? (TimeSpan?)null
- : TimeSpan.Parse(ModuleSettingFake.DefPropertyTimeSpanString!)));
- CollectionAssert.Contains(data,new Tuple<string, string, object?>("PropertyInt", string.Empty, ModuleSettingFake.DefPropertyInt));
- CollectionAssert.Contains(data,new Tuple<string, string, object?>("PropertyBool", string.Empty, ModuleSettingFake.DefPropertyBool));
- }
- }
- }
|