Esempio n. 1
0
        public void TestWriteBackTheSameExactFile() =>
        File.OpenRead(FilePath).Using(stream => Helpers.AssertStream(stream, inStream =>
        {
            var outStream = new MemoryStream();
            SaveKhDDD.Read(inStream).Write(outStream);

            return(outStream);
        }));
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
 public void WriteToStream(Stream stream) => SaveKhDDD.Write(stream, save);
Esempio n. 4
0
        public void OpenStream(Stream stream)
        {
            save = SaveKhDDD.Read <SaveKhDDD.SaveKhDDD3DS>(stream);

            RefreshUi();
        }