public void GetStream_should_work_with_basic_String() { var ss = new StringStream(StringToTest); var(stream, encodingEnum) = ss.GetStream(); var sr = new StreamReader(stream, encodingEnum.Convert()); sr.ReadToEnd().Should().Be(StringToTest); }
public void GetStream_should_work_with_Stream() { var inputStream = new MemoryStream(Encoding.UTF8.GetBytes(StringToTest)); var ss = new StringStream(inputStream, EncodingEnum.UTF8); var(stream, encodingEnum) = ss.GetStream(); var sr = new StreamReader(stream, encodingEnum.Convert()); sr.ReadToEnd().Should().Be(StringToTest); }