public void ReadPostingsCommand_ExecuteRequest_1()
        {
            int returnCode = 0;
            Mock <IIrbisConnection> mock       = GetConnectionMock();
            IIrbisConnection        connection = mock.Object;
            ReadPostingsCommand     command    = new ReadPostingsCommand(connection)
            {
                Database    = "IBIS",
                ListOfTerms = new []
                {
                    "FIRST",
                    "SECOND",
                    "THIRD"
                }
            };
            ResponseBuilder builder = new ResponseBuilder()
                                      .StandardHeader(CommandCode.ReadPostings, 123, 456)
                                      .NewLine()
                                      .Append(returnCode)
                                      .NewLine();
            TestingSocket socket = (TestingSocket)connection.Socket;

            socket.Response = builder.Encode();
            ClientQuery    query    = command.CreateQuery();
            ServerResponse response = command.Execute(query);

            Assert.AreEqual(returnCode, response.ReturnCode);
        }
        public void ReadPostingsCommand_CreateQuery_1()
        {
            Mock <IIrbisConnection> mock       = GetConnectionMock();
            IIrbisConnection        connection = mock.Object;
            ReadPostingsCommand     command    = new ReadPostingsCommand(connection);

            command.CreateQuery();
        }
        public void ReadPostingsCommand_CreateQuery_2()
        {
            Mock <IIrbisConnection> mock       = GetConnectionMock();
            IIrbisConnection        connection = mock.Object;
            ReadPostingsCommand     command    = new ReadPostingsCommand(connection)
            {
                Database    = "IBIS",
                ListOfTerms = new []
                {
                    "FIRST",
                    "SECOND",
                    "THIRD"
                }
            };
            ClientQuery query = command.CreateQuery();

            Assert.IsNotNull(query);
        }