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("PropertyString1", string.Empty, ModuleSettingFake.DefPropertyString1)); CollectionAssert.Contains(data,new Tuple("PropertyString2", string.Empty, ModuleSettingFake.DefPropertyString2)); CollectionAssert.Contains(data,new Tuple("PropertyDateTime1", string.Empty, string.IsNullOrEmpty(ModuleSettingFake.DefPropertyDateTime1String) ? (DateTime?)null : DateTime.Parse(ModuleSettingFake.DefPropertyDateTime1String!))); CollectionAssert.Contains(data,new Tuple("PropertyDateTime2", string.Empty, string.IsNullOrEmpty(ModuleSettingFake.DefPropertyDateTime2String) ? (DateTime?)null : DateTime.Parse(ModuleSettingFake.DefPropertyDateTime2String!))); CollectionAssert.Contains(data,new Tuple("PropertyTimeSpan", string.Empty, string.IsNullOrEmpty(ModuleSettingFake.DefPropertyTimeSpanString) ? (TimeSpan?)null : TimeSpan.Parse(ModuleSettingFake.DefPropertyTimeSpanString!))); CollectionAssert.Contains(data,new Tuple("PropertyInt", string.Empty, ModuleSettingFake.DefPropertyInt)); CollectionAssert.Contains(data,new Tuple("PropertyBool", string.Empty, ModuleSettingFake.DefPropertyBool)); } } }