Lucene.Net.Index.TestCompoundFile.TestTwoFiles C# (CSharp) Method

TestTwoFiles() private method

private TestTwoFiles ( ) : void
return void
        public virtual void TestTwoFiles()
        {
            CreateSequenceFile(Dir, "d1", (sbyte)0, 15);
            CreateSequenceFile(Dir, "d2", (sbyte)0, 114);

            CompoundFileDirectory csw = new CompoundFileDirectory(Dir, "d.cfs", NewIOContext(Random()), true);
            Dir.Copy(csw, "d1", "d1", NewIOContext(Random()));
            Dir.Copy(csw, "d2", "d2", NewIOContext(Random()));
            csw.Dispose();

            CompoundFileDirectory csr = new CompoundFileDirectory(Dir, "d.cfs", NewIOContext(Random()), false);
            IndexInput expected = Dir.OpenInput("d1", NewIOContext(Random()));
            IndexInput actual = csr.OpenInput("d1", NewIOContext(Random()));
            AssertSameStreams("d1", expected, actual);
            AssertSameSeekBehavior("d1", expected, actual);
            expected.Dispose();
            actual.Dispose();

            expected = Dir.OpenInput("d2", NewIOContext(Random()));
            actual = csr.OpenInput("d2", NewIOContext(Random()));
            AssertSameStreams("d2", expected, actual);
            AssertSameSeekBehavior("d2", expected, actual);
            expected.Dispose();
            actual.Dispose();
            csr.Dispose();
        }