public void TestWriteBackTheSameExactFile() => File.OpenRead(FilePath).Using(stream => Helpers.AssertStream(stream, inStream => { var outStream = new MemoryStream(); SaveKhDDD.Read(inStream).Write(outStream); return(outStream); }));
public void TestIsValid(uint header, bool expected) { var stream = new MemoryStream(4); new BinaryWriter(stream).Write(header); stream.Position = 0; Assert.Equal(expected, SaveKhDDD.IsValid(stream)); }
public void WriteToStream(Stream stream) => SaveKhDDD.Write(stream, save);
public void OpenStream(Stream stream) { save = SaveKhDDD.Read <SaveKhDDD.SaveKhDDD3DS>(stream); RefreshUi(); }