Exemplo n.º 1
0
        public void WriteOk(ISession session, params string[] args)
        {
            session.Write(args);

            var response = session.Read();

            RequestWriterAssert.Ok(response);
        }
Exemplo n.º 2
0
        public async Task WriteOkAsync(ISession session, params string[] args)
        {
            await session.WriteAsync(args);

            var response = await session.ReadAsync();

            RequestWriterAssert.Ok(response);
        }
Exemplo n.º 3
0
        public async Task <EnvironmentResponse> WriteStartAsync(ISession session, ConnectionMode mode, string secret)
        {
            var response = await session.ReadAsync();

            RequestWriterAssert.Connected(response);

            await session.WriteAsync("START", mode.ToString().ToLowerInvariant(), secret);

            return(StartResponseParser.Parse(await session.ReadAsync()));
        }
Exemplo n.º 4
0
        public EnvironmentResponse WriteStart(ISession session, ConnectionMode mode, string secret)
        {
            var response = session.Read();

            RequestWriterAssert.Connected(response);

            session.Write("START", mode.ToString().ToLowerInvariant(), secret);

            return(StartResponseParser.Parse(session.Read()));
        }
Exemplo n.º 5
0
        public async Task <string> WriteResultAsync(ISession session, params string[] args)
        {
            await session.WriteAsync(args);

            var response = await session.ReadAsync();

            RequestWriterAssert.Result(response);

            return(response.Substring("RESULT ".Length));
        }
Exemplo n.º 6
0
        public string WriteResult(ISession session, params string[] args)
        {
            session.Write(args);

            var response = session.Read();

            RequestWriterAssert.Result(response);

            return(response.Substring("RESULT ".Length));
        }