public void TestReadFromNewVersion()
    {
      SimpleItemInfos infos = new SimpleItemInfos();

      OptionFileItemInfosAdaptor adaptor = new OptionFileItemInfosAdaptor(infos, "Items");
      XElement option = XElement.Load(@"../../../data/ListFileFormatNew.lst");
      adaptor.LoadFromXml(option);
      Assert.AreEqual(2, infos.Items.Count);
    }
Beispiel #2
0
        public void TestReadFromOldVersion()
        {
            SimpleItemInfos infos = new SimpleItemInfos();

            var adaptor = new OptionFileItemInfosAdaptor(infos, "DatFiles");
            var option  = XElement.Load(@TestContext.CurrentContext.TestDirectory + "/../../../data//ListFileFormatOld.lst", LoadOptions.SetBaseUri);

            adaptor.LoadFromXml(option);
            Assert.AreEqual(1, infos.Items.Count);
        }
Beispiel #3
0
        public void TestReadFromNewVersion()
        {
            SimpleItemInfos infos = new SimpleItemInfos();

            OptionFileItemInfosAdaptor adaptor = new OptionFileItemInfosAdaptor(infos, "Items");
            XElement option = XElement.Load(@TestContext.CurrentContext.TestDirectory + "/../../../data//ListFileFormatNew.lst");

            adaptor.LoadFromXml(option);
            Assert.AreEqual(2, infos.Items.Count);
        }
    public void TestReadFromOldVersion()
    {
      SimpleItemInfos infos = new SimpleItemInfos();

      var adaptor = new OptionFileItemInfosAdaptor(infos, "DatFiles");
      var option = XElement.Load(@"../../../data/ListFileFormatOld.lst", LoadOptions.SetBaseUri);
      adaptor.LoadFromXml(option);
      Assert.AreEqual(1, infos.Items.Count);


    }
Beispiel #5
0
 public void SaveToXml(System.Xml.Linq.XElement option)
 {
   var adaptor = new OptionFileItemInfosAdaptor(listBoxAdaptor, Key);
   adaptor.SaveToXml(option);
 }
Beispiel #6
0
        public void SaveToXml(System.Xml.Linq.XElement option)
        {
            var adaptor = new OptionFileItemInfosAdaptor(listBoxAdaptor, Key);

            adaptor.SaveToXml(option);
        }