public async Task ReadAsStringAsync_CalledOnStream_StreamContentReturned() { using var ms = new DelayedMemoryStream(); var bytes = Encoding.UTF8.GetBytes("TestString"); ms.Write(bytes, 0, bytes.Length); ms.Position = 0; // Act var result = await ms.ReadAsStringAsync(); Assert.Equal("TestString", result); }
public override void OnTeardown() { Input.Close(); Input.Dispose(); Input = null; }
public override void OnSetup() { Input = new DelayedMemoryStream(Resources.bahrainholding); }
public override void OnTeardown() { Input.Close(); Input.Dispose(); Input = null; }
public override void OnSetup() { Input = new DelayedMemoryStream(Resources.bahrainholding); }