1616
1717package  com.mongodb 
1818
19- 
19+ import   org.bson.UuidRepresentation 
2020import  spock.lang.IgnoreIf 
2121import  spock.lang.Specification 
2222import  spock.lang.Unroll 
@@ -140,6 +140,7 @@ class MongoClientURISpecification extends Specification {
140140                +  ' heartbeatFrequencyMS=20000&' 
141141                +  ' retryWrites=true&' 
142142                +  ' retryReads=true&' 
143+                 +  ' uuidRepresentation=csharpLegacy&' 
143144                +  ' appName=app1' 
144145
145146        when :
@@ -164,6 +165,7 @@ class MongoClientURISpecification extends Specification {
164165        options. getHeartbeatFrequency() ==  20000 
165166        options. getRetryWrites()
166167        options. getRetryReads()
168+         options. getUuidRepresentation() ==  UuidRepresentation . C_SHARP_LEGACY 
167169        options. getApplicationName() ==  ' app1' 
168170    }
169171
@@ -183,6 +185,7 @@ class MongoClientURISpecification extends Specification {
183185        ! options. isSslEnabled()
184186        options. getRetryWrites()
185187        options. getRetryReads()
188+         options. getUuidRepresentation() ==  UuidRepresentation . JAVA_LEGACY 
186189    }
187190
188191    def  ' should apply default uri to options' 
@@ -214,6 +217,7 @@ class MongoClientURISpecification extends Specification {
214217                .localThreshold(25 )
215218                .requiredReplicaSetName(' test' 
216219                .compressorList([MongoCompressor . createZlibCompressor()])
220+                 .uuidRepresentation(UuidRepresentation . C_SHARP_LEGACY )
217221
218222        when :
219223        def  options =  new  MongoClientURI (' mongodb://localhost' . getOptions()
@@ -246,6 +250,7 @@ class MongoClientURISpecification extends Specification {
246250        options. getServerSettings(). getHeartbeatFrequency(MILLISECONDS ) ==  5 
247251        options. getServerSettings(). getMinHeartbeatFrequency(MILLISECONDS ) ==  11 
248252        options. compressorList ==  [MongoCompressor . createZlibCompressor()]
253+         options. getUuidRepresentation() ==  UuidRepresentation . C_SHARP_LEGACY 
249254    }
250255
251256    @Unroll 
0 commit comments