예제 #1
0
        public void XmlDataSource_SerializeCollectionTest1()
        {
            string outputFile = @".\products.xml";

            IProductCollection products = new kiosk.Model.ProductCollection();

            products.AddNew("Apple");
            products.AddNew("Banana");
            products.AddNew("Apple");
            products.AddNew("Apple");

            XmlSource.Save(products, outputFile);

            Assert.IsTrue(System.IO.File.Exists(outputFile));

            //Cleanup
            System.IO.File.Delete(outputFile);
        }