Beispiel #1
0
        public async Task TestHandleReadAndWriteBlank()
        {
            using var stream = GenerateStreamFromString(BLANK);

            var   copy = new MemoryStream();
            await stream !.CopyToAsync(copy);

            stream !.Seek(0, SeekOrigin.Begin);
            var profile = await ProfileParser.Read(stream !);

            using var output = await ProfileParser.Write(profile);

            verifyNoDataLossOnWrite(copy, output);
        }
Beispiel #2
0
        public async Task TestNoDataLossOnWrite(string filename)
        {
            var filePath = Path.Combine(Constants.FILE_DIALOG_INITIAL_DIRECTORY, "2533274911688652", "Characters", filename);

            using var stream = await decryptFileIntoStream(filePath);

            var   copy = new MemoryStream();
            await stream !.CopyToAsync(copy);

            stream !.Seek(0, SeekOrigin.Begin);
            var profile = await ProfileParser.Read(stream !);

            using var output = await ProfileParser.Write(profile);

            verifyNoDataLossOnWrite(copy, output);
        }