public void TestSaveAndLoad() { var saved = GetPasswordSettings(); Persistence.Save(saved); PasswordSettingsTest loaded = Persistence.Load <PasswordSettingsTest>(); Assert.IsNotNull(loaded); Assert.AreEqual(saved.Length, loaded.Length); Assert.AreEqual(saved.ForceEach, loaded.ForceEach); }
private static PasswordSettingsTest GetPasswordSettings() { var result = new PasswordSettingsTest { Length = 12, ForceEach = true, IncludeNumeric = true, IncludeAlphaLower = true, IncludeAlphaUpper = true, IncludeSymbolSetNormal = true, IncludeSymbolSetExtended = true }; return(result); }