Exemple #1
0
        public void SerializeDirtyExbin()
        {
            NintendoLand.DataFormats.StageData stageData = NintendoLand.DataFormats.StageData.Load(pathToYsiExtract);

            NintendoLand.DataFormats.StageData.Stage stage01 = stageData.GetLevelByID(1);
            stage01.backgroundID = new NintendoLand.DataFormats.IndexResolver(8);
            stageData.UpdateLevelByID(1, stage01);

            List <byte> serializedDefaultStageData = new List <byte>();

            stageData.SerializeExbin(ref serializedDefaultStageData, 20 + (NintendoLand.DataFormats.StageData.Stage.BYTES_REQUIRED * 61));

            CollectionAssert.AreNotEqual(
                File.ReadAllBytes(Path.Combine(pathToYsiExtract, "StageData.exbin")),
                serializedDefaultStageData
                );
        }
Exemple #2
0
 public void InsertUpdateFruitReturnValue()
 {
     NintendoLand.DataFormats.StageData stageData = NintendoLand.DataFormats.StageData.Load(pathToYsiExtract);
     Assert.IsTrue(stageData.UpdateLevelByID(1, NintendoLand.DataFormats.StageData.Stage.CreateBlankDefault(1)));
     Assert.IsFalse(stageData.UpdateLevelByID(200, NintendoLand.DataFormats.StageData.Stage.CreateBlankDefault(200)));
 }