public void Initialize() { Object1 = new DuckObject { Var1 = RandomStringGenerator.RandomString(155), Var2 = RandomStringGenerator.RandomString(190) }; Object2 = new DuckObject { Var1 = RandomStringGenerator.RandomString(143), Var2 = RandomStringGenerator.RandomString(550) }; _serializer = new XmlSerializer(typeof(DuckObject)); }
public void CanWriteAndDeleteComplexSiteSetting() { var key = "monkey2"; var value = new DuckObject { Var1 = "beans", Var2 = "ham" }; IsolatedStorageHelper.SaveSiteSetting(key, value); var returnValue = IsolatedStorageHelper.GetSiteSetting(key); Assert.IsInstanceOfType(returnValue, value.GetType()); Assert.IsTrue((DuckObject)returnValue == value); IsolatedStorageHelper.RemoveSiteSetting(key); var returnValue2 = IsolatedStorageHelper.GetSiteSetting(key); Assert.IsNull(returnValue2); }