public void DeserializeTest()
        {
            SerializeTest();

            CollectionSerializer target = new CollectionSerializer();
            IList models = new List<TestModel>();

            string modelType = "testModel";
            string fileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "test", "test_models.xml");
            models = target.Deserialize(fileName, modelType, typeof(TestModel), models);

            Assert.AreEqual(models.Count, 2);

            IList models2 = CreateModels();
            for (int i = 0; i < models2.Count; i++) {
                Assert.IsTrue(models2[i].Equals(models[i]));
            }
        }
        public void SerializeTest()
        {
            CollectionSerializer target = new CollectionSerializer();
            IList models = CreateModels();

            string rootName = "testModels";
            string modelType = "testModel";
            string fileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "test",  "test_models.xml");
            target.Serialize(models, rootName, modelType, fileName);

            Assert.IsTrue(File.Exists(fileName));
        }