Exemple #1
0
 public PersistentObservableStrings(string key)
 {
     persistence = new PersistentStrings(key);
     foreach (var item in persistence)
     {
         Add(item);
     }
 }
        PersistentStrings BuildTestList()
        {
            var list = new PersistentStrings(editGroup);

            list.Add("0");
            list.Add("1");
            list.Add("2");
            return(list);
        }
        public void TestLoadingStringsFromPersistence()
        {
            BuildTestList();
            var list = new PersistentStrings(editGroup);

            for (var i = 0; i < list.Count; i++)
            {
                Assert.That(list[i], Is.EqualTo(i.ToString()));
            }
            Assert.That(list.Count, Is.EqualTo(3));
        }