Пример #1
0
        public void ReadMultiLineResponseInBatch()
        {
            StubChannelResponse("200-bla\r\n 300 test\r\n200 OK\r\n");

            comm.AttachToChannel(channel);
            FtpServerResponse response = comm.ReadResponse();

            Assert.AreEqual((int)FtpReturnCode.CommandOk, response.ReturnCode);
            Assert.AreEqual("bla", response.Message);
        }
Пример #2
0
        public void ReadSingleLineResponse()
        {
            StubChannelResponse("200 bla\r\n");

            comm.AttachToChannel(channel);
            FtpServerResponse response = comm.ReadResponse();

            Assert.AreEqual((int)FtpReturnCode.CommandOk, response.ReturnCode);
            Assert.AreEqual("bla", response.Message);
        }