public void WriteBsonType_should_have_expected_effect( BsonType value, byte expectedByte) { using (var memoryStream = new MemoryStream()) using (var stream = new BsonStreamAdapter(memoryStream)) { var expectedBytes = new byte[] { expectedByte }; stream.WriteBsonType(value); memoryStream.ToArray().Should().Equal(expectedBytes); } }