public void Test_Reading_Successfully <T>(TestCaseData <T> testData) { SetupStreamWithArray(testData.Bytes); testData .Function(reader) .Should() .Be(testData.ExpectedResult); stream.Position.Should().Be(testData.Bytes.Length); }