public void ReadStreamMultipleTimes() { using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes("A temporary resource."))) { StreamResource res = new StreamResource(stream); Assert.IsTrue(res.IsOpen); Assert.IsNull(res.Uri); res.GetStream(); res.GetStream(); } }
public void ReadStreamMultipleTimes() { using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes("A temporary resource."))) { StreamResource res = new StreamResource(stream); Assert.IsTrue(res.IsOpen); Assert.IsNull(res.Uri); res.GetStream(); res.GetStream(); } }
public void Instantiation() { using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes("A temporary resource."))) { StreamResource res = new StreamResource(stream); Assert.IsTrue(res.IsOpen); Assert.IsNull(res.Uri); Assert.IsNotNull(res.GetStream()); } }
public void Instantiation() { using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes("A temporary resource."))) { StreamResource res = new StreamResource(stream); Assert.IsTrue(res.IsOpen); Assert.IsNull(res.Uri); Assert.IsNotNull(res.GetStream()); } }