public void GetReplyMessageEncoder_should_return_a_ReplyMessageJsonEncoder() { using (var textReader = new StringReader("")) { var encoderFactory = new JsonMessageEncoderFactory(textReader, null, __messageEncoderSettings); var encoder = encoderFactory.GetReplyMessageEncoder <BsonDocument>(BsonDocumentSerializer.Instance); encoder.Should().BeOfType <ReplyMessageJsonEncoder <BsonDocument> >(); } }
public void GetReplyMessageEncoder_should_return_a_ReplyMessageJsonEncoder() { using (var stringWriter = new StringWriter()) using (var jsonWriter = new JsonWriter(stringWriter)) { var encoderFactory = new JsonMessageEncoderFactory(null, jsonWriter); var encoder = encoderFactory.GetReplyMessageEncoder <BsonDocument>(BsonDocumentSerializer.Instance); encoder.Should().BeOfType <ReplyMessageJsonEncoder <BsonDocument> >(); } }