Example #1
0
        public void SaveData_ShouldSaveExtendedCameras()
        {
            // GIVEN
            var camFile =
                FileTesting.CreateFileFromResource("TDUModdingLibraryTests.Resources.cameras." +
                                                   ExtendedCamerasResourceFile, Path.Combine(_tempPath, ExtendedCamerasResourceFile));
            var initialCameras = new Cameras(camFile);

            // WHEN
            string savedFileName = Path.Combine(_tempPath, "saved-" + ExtendedCamerasResourceFile);

            initialCameras.SaveAs(savedFileName);

            // THEN
            var savedCameras = new Cameras(savedFileName);

            Assert.AreEqual(initialCameras.Index.Count, savedCameras.Index.Count);
            Assert.AreEqual(initialCameras.Entries.Count, savedCameras.Entries.Count);
        }