Пример #1
0
        public void SetLengthTest()
        {
            SftpSession    session = null;                                    // TODO: Initialize to an appropriate value
            string         path    = string.Empty;                            // TODO: Initialize to an appropriate value
            FileMode       mode    = new FileMode();                          // TODO: Initialize to an appropriate value
            SftpFileStream target  = new SftpFileStream(session, path, mode); // TODO: Initialize to an appropriate value
            long           value   = 0;                                       // TODO: Initialize to an appropriate value

            target.SetLength(value);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Пример #2
0
 protected void Act()
 {
     try
     {
         _sftpFileStream.SetLength(5);
         Assert.Fail();
     }
     catch (ObjectDisposedException ex)
     {
         _actualException = ex;
     }
 }
 protected void Act()
 {
     try
     {
         _sftpFileStream.SetLength(_length);
         Assert.Fail();
     }
     catch (NotSupportedException ex)
     {
         _actualException = ex;
     }
 }
 protected override void Act()
 {
     try
     {
         _target.SetLength(_length);
         Assert.Fail();
     }
     catch (ObjectDisposedException ex)
     {
         _actualException = ex;
     }
 }
 protected void Act()
 {
     _sftpFileStream.SetLength(_length);
 }
Пример #6
0
 public override void SetLength(long value)
 {
     _fs.SetLength(value);
 }