public void Load() { var target = new StatVfsReplyInfo(); #if TUNING var sshDataStream = new SshDataStream(4 + 1 + 4 + 88); sshDataStream.Write((uint) (sshDataStream.Capacity - 4)); #else var sshDataStream = new SshDataStream(1 + 4 + 88); #endif sshDataStream.WriteByte((byte) SftpMessageTypes.ExtendedReply); sshDataStream.Write(_responseId); sshDataStream.Write(_bsize); sshDataStream.Write(_frsize); sshDataStream.Write(_blocks); sshDataStream.Write(_bfree); sshDataStream.Write(_bavail); sshDataStream.Write(_files); sshDataStream.Write(_ffree); sshDataStream.Write(_favail); sshDataStream.Write(_sid); sshDataStream.Write((ulong) 0x1); sshDataStream.Write(_namemax); target.Load(sshDataStream.ToArray()); Assert.IsNotNull(target.Information); var information = target.Information; Assert.AreEqual(_bavail, information.AvailableBlocks); Assert.AreEqual(_favail, information.AvailableNodes); Assert.AreEqual(_frsize, information.BlockSize); Assert.AreEqual(_bsize, information.FileSystemBlockSize); Assert.AreEqual(_bfree, information.FreeBlocks); Assert.AreEqual(_ffree, information.FreeNodes); Assert.IsTrue(information.IsReadOnly); Assert.AreEqual(_namemax, information.MaxNameLenght); Assert.AreEqual(_sid, information.Sid); Assert.IsTrue(information.SupportsSetUid); Assert.AreEqual(_blocks, information.TotalBlocks); Assert.AreEqual(_files, information.TotalNodes); }
public void Constructor() { var target = new StatVfsReplyInfo(); Assert.IsNull(target.Information); }