Ejemplo n.º 1
0
        public static void VisitTextZones(TextZone zone)
        {
            var preText  = zone.GetPreTextData();
            var postText = zone.GetPostTextData();
            var text     = zone.GetTextData();

            Assert.NotNull(text);
            Assert.NotNull(preText);
            Assert.NotNull(postText);

            foreach (TextZone z in zone.Children)
            {
                VisitTextZones(z);
            }
        }
Ejemplo n.º 2
0
        public void TextZone_Theory(string file)
        {
            using (FileStream stream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.Read))
                using (DjvuReader reader = new DjvuReader(stream))
                {
                    TxtzChunk unk = new TxtzChunk(reader, null, null, null, stream.Length);

                    Assert.True(unk.TextLength > 0);
                    Assert.NotNull(unk.Text);
                    Assert.Equal(unk.TextLength, unk.Text.Length);
                    Assert.Equal(1, unk.Version);

                    TextZone zone     = unk.Zone;
                    var      preText  = zone.GetPreTextData();
                    var      postText = zone.GetPostTextData();
                    var      text     = zone.GetTextData();

                    Assert.NotNull(text);
                }
        }