public void GetPipeStream_WhenConnected_ReturnsStream()
        {
            _connection = TestHelper.CreateConnection();
            _connection.Connect();

            using (var stream = _connection.GetPipeStream())
            {
                Assert.IsNotNull(stream);
            }
        }
예제 #2
0
        public void GetPipeStream_WhenConnected_ReturnsStream()
        {
            _connection = TestHelper.CreateConnection();
            _connection.Connect();

            using(var stream = _connection.GetPipeStream())
            {
                Assert.IsNotNull(stream);
            }
        }
예제 #3
0
        protected virtual void OnExecute(ISimoConnection connection)
        {
            var request = GenerateRequest();

            using (var requestStream = connection.GetPipeStream())
            {
                using (var requestWriter = new RequestWriter(requestStream))
                {
                    requestWriter.Write(request);

                    OnRequestSent();
                }
            }
        }
예제 #4
0
        protected virtual void OnExecute(ISimoConnection connection)
        {
            var request = GenerateRequest();

            //using (var requestStream = connection.GetPipeStream())
            var requestStream = connection.GetPipeStream();
            //{
            //using (var requestWriter = new RequestWriter(requestStream))
            var requestWriter = new RequestWriter(requestStream);
            //{
            requestWriter.Write(request);

            OnRequestSent();
            //}
            //}
        }
예제 #5
0
        public void GetPipeStream_WhileNotConnected_ThrowsException()
        {
            _connection = TestHelper.CreateConnection();

            var stream = _connection.GetPipeStream();

            Assert.IsNull(stream, "Pipestream shall not be returned when not connected!");
        }