public void SaveAndLoad() { database.PutSojo(new Sojo("id1", "Name1", SojoType.SoundEffect, "Content1")); database.PutSojo(new Sojo("id2", "Name2", SojoType.ParticleEffect, "Content2")); database.PutSojo(new Sojo("id3", "Name3", SojoType.SoundEffect, "Content3")); SojoDatabase.Saved saved = database.Save(); database = new SojoDatabase(); database.Load(saved); Assert.AreEqual("Name1", database.GetSojoById("id1").name); Assert.AreEqual("Name2", database.GetSojoById("id2").name); Assert.AreEqual("Name3", database.GetSojoById("id3").name); Assert.AreEqual(SojoType.SoundEffect, database.GetSojoById("id1").contentType); Assert.AreEqual(SojoType.ParticleEffect, database.GetSojoById("id2").contentType); }