< Summary

Information
Class: Renci.SshNet.Sftp.Responses.SftpStatusResponse
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Sftp\Responses\SftpStatusResponse.cs
Line coverage
84%
Covered lines: 16
Uncovered lines: 3
Coverable lines: 19
Total lines: 43
Line coverage: 84.2%
Branch coverage
75%
Covered branches: 3
Total branches: 4
Branch coverage: 75%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_SftpMessageType()100%10%
.ctor(...)100%1100%
get_StatusCode()100%1100%
get_ErrorMessage()100%1100%
get_Language()100%1100%
LoadData()75%483.33%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Sftp\Responses\SftpStatusResponse.cs

#LineLine coverage
 1namespace Renci.SshNet.Sftp.Responses
 2{
 3    internal sealed class SftpStatusResponse : SftpResponse
 4    {
 5        public override SftpMessageTypes SftpMessageType
 6        {
 07            get { return SftpMessageTypes.Status; }
 8        }
 9
 10        public SftpStatusResponse(uint protocolVersion)
 1517611            : base(protocolVersion)
 1517612        {
 1517613        }
 14
 3394315        public StatusCodes StatusCode { get; private set; }
 16
 1551117        public string ErrorMessage { get; private set; }
 18
 1510119        public string Language { get; private set; }
 20
 21        protected override void LoadData()
 1510122        {
 1510123            base.LoadData();
 24
 1510125            StatusCode = (StatusCodes) ReadUInt32();
 26
 1510127            if (ProtocolVersion < 3)
 028            {
 029                return;
 30            }
 31
 1510132            if (!IsEndOfData)
 1510133            {
 34                // the SSH File Transfer Protocol specification states that the error message is UTF-8
 1510135                ErrorMessage = ReadString(Utf8);
 36
 37                // the language of the error message; RFC 1766 states that the language code may be
 38                // expressed as US-ASCII
 1510139                Language = ReadString(Ascii);
 1510140            }
 1510141        }
 42    }
 43}