public void SingleLargeEntry() { const string EntryName = "LargeTarEntry"; const TestDataSize dataSize = TestDataSize.Large; PerformanceTesting.TestReadWrite( size: dataSize, input: bs => { var tis = new TarInputStream(bs, null); var entry = tis.GetNextEntry(); Assert.AreEqual(EntryName, entry.Name); return(tis); }, output: bs => { var tos = new TarOutputStream(bs, null); tos.PutNextEntry(new TarEntry(new TarHeader() { Name = EntryName, Size = (int)dataSize, })); return(tos); }, outputClose: stream => { ((TarOutputStream)stream).CloseEntry(); } ); }
public static void TestWrite(TestDataSize size, Func <Stream, Stream> output, Action <Stream> outputClose = null) => TestWrite((int)size, output, outputClose);