public void SaveTest()
        {
            string[] items = {@"abc","123"};
            string filePath = Path.Combine(Directory.GetCurrentDirectory(),"test.xml");

            if (File.Exists(filePath))
                File.Delete(filePath);

            var repo = new ClipboardXmlRepository();
            repo.SetSource(filePath);
            repo.Save(items);

            Assert.IsTrue(File.Exists(filePath));
        }
        public void SaveTest()
        {
            string[] items    = { @"abc", "123" };
            string   filePath = Path.Combine(Directory.GetCurrentDirectory(), "test.xml");

            if (File.Exists(filePath))
            {
                File.Delete(filePath);
            }

            var repo = new ClipboardXmlRepository();

            repo.SetSource(filePath);
            repo.Save(items);

            Assert.IsTrue(File.Exists(filePath));
        }
        public void ValidateSaveAndGetReturnSameNumberOfItems()
        {
            string[] items = {"abc", "123" };
            string filePath = Path.Combine(Directory.GetCurrentDirectory(), "test3.xml");

            if (File.Exists(filePath))
                File.Delete(filePath);

            var repo = new ClipboardXmlRepository();
            repo.SetSource(filePath);
            repo.Save(items);

            var saveditems = repo.Get();

            Console.WriteLine("items.length: {0}, saveitems.length:{1}", items.Length, saveditems.Length);

            Assert.IsTrue(items.Length == saveditems.Length);
        }
        public void ValidateSaveAndGetReturnItemsAreTheSame()
        {
            string[] items = { "abc", "123" };
            string filePath = Path.Combine(Directory.GetCurrentDirectory(), "test3.xml");

            if (File.Exists(filePath))
                File.Delete(filePath);

            var repo = new ClipboardXmlRepository();
            repo.SetSource(filePath);
            repo.Save(items);

            var saveditems = repo.Get();

            Console.WriteLine("items[0]= {0}, saveitems[0]={1}", items[0], saveditems[0]);
            Console.WriteLine("items[1]= {0}, saveitems[1]={1}", items[1], saveditems[1]);

            Assert.IsTrue(items.Length == saveditems.Length && items[0].Equals(saveditems[0]) && items[1].Equals(saveditems[1]), "Saved items do not match");
        }
        public void ValidateSaveAndGetReturnSameNumberOfItems()
        {
            string[] items    = { "abc", "123" };
            string   filePath = Path.Combine(Directory.GetCurrentDirectory(), "test3.xml");

            if (File.Exists(filePath))
            {
                File.Delete(filePath);
            }

            var repo = new ClipboardXmlRepository();

            repo.SetSource(filePath);
            repo.Save(items);

            var saveditems = repo.Get();

            Console.WriteLine("items.length: {0}, saveitems.length:{1}", items.Length, saveditems.Length);

            Assert.IsTrue(items.Length == saveditems.Length);
        }
        public void ValidateSaveAndGetReturnItemsAreTheSame()
        {
            string[] items    = { "abc", "123" };
            string   filePath = Path.Combine(Directory.GetCurrentDirectory(), "test3.xml");

            if (File.Exists(filePath))
            {
                File.Delete(filePath);
            }

            var repo = new ClipboardXmlRepository();

            repo.SetSource(filePath);
            repo.Save(items);

            var saveditems = repo.Get();

            Console.WriteLine("items[0]= {0}, saveitems[0]={1}", items[0], saveditems[0]);
            Console.WriteLine("items[1]= {0}, saveitems[1]={1}", items[1], saveditems[1]);

            Assert.IsTrue(items.Length == saveditems.Length && items[0].Equals(saveditems[0]) && items[1].Equals(saveditems[1]), "Saved items do not match");
        }