public void Test_Writing_Succesfully <T>(TestCaseData <T> testData) { testData.ExecuteAction(writer); stream .ToArray() .Should() .Equal(testData.ExpectedResult); }