Exemplo n.º 1
0
            public void CheckForLength() => File.OpenRead("kh2/res/arif.bin").Using(stream =>
            {
                var worlds = Arif.Read(stream);

                Assert.Equal(19, worlds.Count);
                Assert.Equal(64, worlds[0].Count);
                Assert.Equal(2, worlds[1].Count);
                Assert.Equal(42, worlds[2].Count);
            });
Exemplo n.º 2
0
            public void ShouldWriteTheExactSameFile() => File.OpenRead("kh2/res/arif.bin").Using(stream =>
            {
                Helpers.AssertStream(stream, x =>
                {
                    var outStream = new MemoryStream();
                    Arif.Write(outStream, Arif.Read(x));

                    return(outStream);
                });
            });