public void LoadTest()
        {
            // save
            SaveTest();

            // load
            Vehicle vehicle = new Vehicle() { VehicleId = "v121212121212" };
            int year = 2012;
            int month = 03;
            TrackCatalog cat = new TrackCatalog(vehicle, year, month);

            string catalogPath = Path.Combine(PersonalTest.StorageRoot, vehicle.VehicleId, TrackCatalog.MakeFileName(year, month));
            cat.Load(catalogPath);

            Assert.AreEqual(cat.Tracks.Count, 2);
            Assert.AreEqual(cat.Tracks[0].CreateDate, new DateTime(2012, 3, 11, 20, 37, 31));
        }
        private void LoadTrackCatalog(string folder)
        {
            m_catalogs.Clear();

            string[] files = Directory.GetFiles(folder, "*.xml");

            foreach (string file in files) {
                TrackCatalog cat = new TrackCatalog(Vehicle, 1, 1);
                cat.Load(file);
                m_catalogs.Add(cat);
            }
        }
        public void SaveTest()
        {
            Vehicle vehicle = new Vehicle() { VehicleId = "v121212121212" };
            int year = 2012;
            int month = 03;
            TrackCatalog cat = new TrackCatalog(vehicle, year, month);

            List<string> files = new List<string>();
            files.Add("all_2012_03_11_20_37_31");
            files.Add("all_2012_03_12_20_37_31");

            cat.Add(files);
            Assert.AreEqual(cat.Tracks.Count, 2);

            string catalogPath = Path.Combine(PersonalTest.StorageRoot, vehicle.VehicleId, TrackCatalog.MakeFileName(year, month));
            cat.Save(catalogPath);

            Assert.IsTrue(File.Exists(catalogPath));
        }
 public void Save(TrackCatalog catalog)
 {
 }