public void Extract_TestMPK_SameTxtContent() { var mpk = new MPK.MPK(mpkFileLocation, false); mpk.Extract(extractPath); var actualFileText = File.ReadAllText(Path.Combine(extractPath, textFileLocation)); var expectedFileText = textFileContent; Assert.AreEqual(expectedFileText, actualFileText); }
public void Save_TestTxtToMPK_CorrectCRC() { var newMPK = new MPK.MPK(mpkFileLocation, true); var mpkFile = new MPKFile(textFileLocation); newMPK.AddFile(mpkFile); newMPK[textFileLocation].Header.TimeStamp = 0; //Make MPK creation deterministic newMPK.Save(); Assert.AreEqual(1, newMPK.Count); var expectedCRCValue = 375344986; Assert.AreEqual(expectedCRCValue, newMPK.CRCValue); }
public void Open_TestMPK_NoExceptions() { _ = new MPK.MPK(mpkFileLocation, false); }