Esempio n. 1
0
        public void ReadDataTest()
        {
            Mock <IDjvuReader> readerMock = new Mock <IDjvuReader>();

            readerMock.SetupProperty <long>(x => x.Position);
            IDjvuReader reader = readerMock.Object;

            reader.Position = 1024;

            BG44Chunk unk = new BG44Chunk(readerMock.Object, null, null, null, 1024);

            Assert.Equal <ChunkType>(ChunkType.BG44, unk.ChunkType);
            Assert.Equal(ChunkType.BG44.ToString(), unk.Name);
            Assert.Equal <long>(1024, unk.DataOffset);

            unk.ReadData(reader);
            Assert.Equal <long>(2048, reader.Position);
        }