Ejemplo n.º 1
0
        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);
     }
 }
Ejemplo n.º 3
0
        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 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 FileSystemResourceOpenNonExistanceFile()
 {
     FileResource res = new FileResource(TemporaryFileName);
     Stream stream = res.GetStream();
 }
Ejemplo n.º 6
0
 public void FileSystemResourceOpenNonExistanceFile()
 {
     FileResource res    = new FileResource(TemporaryFileName);
     Stream       stream = res.GetStream();
 }