public void GetScheduleTest() { string compareAgainst = GameSaveToolTest.GetTextFileContents("BaseSchedule.txt").Replace("\r\n", "\n"); GamesaveTool tool = new GamesaveTool(); tool.LoadSaveFile(GetFilePath("Base_NFL2K5_SAVEGAME.DAT")); string schedule = tool.GetSchedule(); int index = compareAgainst.IndexOf(schedule); Assert.IsTrue(index > -1, "Error! there is a difference form the base to what we got."); }
public void GetDraftClassTest() { string compareAgainst = GameSaveToolTest.GetTextFileContents("AllBasePlayers.txt").Replace("\r\n", "\n"); GamesaveTool tool = new GamesaveTool(); tool.LoadSaveFile(GetFilePath("Base_NFL2K5_SAVEGAME.DAT")); string leaguePlayers = tool.GetTeamPlayers("DraftClass", true, true).Replace("\r\n", "\n"); int index = compareAgainst.IndexOf(leaguePlayers); Assert.IsTrue(index > -1, "Error! there is a difference form the base to what we got."); }
public void SaveScheduleDataTest() { GamesaveTool tool = new GamesaveTool(); tool.LoadSaveFile(GetFilePath("Base_NFL2K5_SAVEGAME.DAT")); Byte[] baseData = new byte[tool.GameSaveData.Length]; Array.Copy(tool.GameSaveData, baseData, baseData.Length); InputParser parser = new InputParser(tool); parser.ProcessText(GameSaveToolTest.GetTextFileContents("BaseSchedule.txt")); Byte[] modifiedData = new byte[tool.GameSaveData.Length]; Array.Copy(tool.GameSaveData, modifiedData, baseData.Length); int loc = CompareArrays(baseData, modifiedData); Assert.AreEqual(-1, loc, "Error! data differs at location " + loc.ToString("X")); }