public void IrbisVersion_ParseServerResponse_2()
        {
            // В три строки
            ResponseBuilder builder = new ResponseBuilder();

            builder
            .AppendAnsi("64.2015.1").NewLine()
            .AppendAnsi("10").NewLine()
            .AppendAnsi("100000").NewLine();

            IrbisConnection connection = new IrbisConnection();

            byte[]         query    = new byte[0];
            byte[]         answer   = builder.Encode();
            ServerResponse response = new ServerResponse
                                      (
                connection,
                answer,
                query,
                true
                                      );

            IrbisVersion version = IrbisVersion.ParseServerResponse(response);

            Assert.IsNull(version.Organization);
            Assert.AreEqual("64.2015.1", version.Version);
            Assert.AreEqual(10, version.ConnectedClients);
            Assert.AreEqual(100000, version.MaxClients);
        }
        public void IrbisVersion_ParseServerResponse_1()
        {
            // В четыре строки
            ResponseBuilder builder = new ResponseBuilder();

            builder
            .AppendAnsi("Иркутский государственный технический университет").NewLine()
            .AppendAnsi("64.2015.1").NewLine()
            .AppendAnsi("10").NewLine()
            .AppendAnsi("100000").NewLine();

            IrbisConnection connection = new IrbisConnection();

            byte[]         query    = new byte[0];
            byte[]         answer   = builder.Encode();
            ServerResponse response = new ServerResponse
                                      (
                connection,
                answer,
                query,
                true
                                      );

            IrbisVersion version = IrbisVersion.ParseServerResponse(response);

            Assert.AreEqual("Иркутский государственный технический университет", version.Organization);
            Assert.AreEqual("64.2015.1", version.Version);
            Assert.AreEqual(10, version.ConnectedClients);
            Assert.AreEqual(100000, version.MaxClients);
        }
        /// <inheritdoc />
        public override ServerResponse Execute
        (
            ClientQuery query
        )
        {
            ServerResponse response = base.Execute(query);

            response.GetReturnCode();
            Result = IrbisVersion.ParseServerResponse(response);

            return(response);
        }
        public void IrbisVersion_ParseServerResponse_4()
        {
            // В три строки
            List <string> response = new List <string>
            {
                "64.2015.1",
                "10",
                "100000"
            };

            IrbisVersion version = IrbisVersion.ParseServerResponse(response);

            Assert.IsNull(version.Organization);
            Assert.AreEqual("64.2015.1", version.Version);
            Assert.AreEqual(10, version.ConnectedClients);
            Assert.AreEqual(100000, version.MaxClients);
        }
        public void IrbisVersion_ParseServerResponse_3()
        {
            // В четыре строки
            List <string> response = new List <string>
            {
                "Иркутский государственный технический университет",
                "64.2015.1",
                "10",
                "100000"
            };

            IrbisVersion version = IrbisVersion.ParseServerResponse(response);

            Assert.AreEqual("Иркутский государственный технический университет", version.Organization);
            Assert.AreEqual("64.2015.1", version.Version);
            Assert.AreEqual(10, version.ConnectedClients);
            Assert.AreEqual(100000, version.MaxClients);
        }