示例#1
0
        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.");
        }
示例#2
0
        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.");
        }
示例#3
0
        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"));
        }