public void ReadStreamMultipleTimes() { FileInfo file = GetAssemblyLocation(Assembly.GetExecutingAssembly()); FileResource res = new FileResource(file.FullName); Assert.IsFalse(res.IsOpen); using (Stream stream = res.GetStream()) { Assert.IsNotNull(stream); } using (Stream stream = res.GetStream()) { Assert.IsNotNull(stream); } }
public void FileResourceValidStream() { FileInfo file = GetAssemblyLocation(Assembly.GetExecutingAssembly()); FileResource res = new FileResource(file.FullName); using (Stream stream = res.GetStream()) { Assert.IsNotNull(stream); Assert.IsTrue(stream.CanRead); } }
public void FileSystemResourceOpenNonExistanceFile() { FileResource res = new FileResource(TemporaryFileName); Stream stream = res.GetStream(); }