public void GetPipeStream_WhenConnected_ReturnsStream() { _connection = TestHelper.CreateConnection(); _connection.Connect(); using (var stream = _connection.GetPipeStream()) { Assert.IsNotNull(stream); } }
public void GetPipeStream_WhenConnected_ReturnsStream() { _connection = TestHelper.CreateConnection(); _connection.Connect(); using(var stream = _connection.GetPipeStream()) { Assert.IsNotNull(stream); } }
protected virtual void OnExecute(ISimoConnection connection) { var request = GenerateRequest(); using (var requestStream = connection.GetPipeStream()) { using (var requestWriter = new RequestWriter(requestStream)) { requestWriter.Write(request); OnRequestSent(); } } }
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(); //} //} }
public void GetPipeStream_WhileNotConnected_ThrowsException() { _connection = TestHelper.CreateConnection(); var stream = _connection.GetPipeStream(); Assert.IsNull(stream, "Pipestream shall not be returned when not connected!"); }