@@ -42,13 +42,13 @@ public void ChunkSize_get_should_return_expected_result()
42
42
[ Test ]
43
43
public void constructor_should_initialize_subject ( )
44
44
{
45
- var maxPoolSize = 1 ;
45
+ var maxChunkCount = 1 ;
46
46
var chunkSize = 16 ;
47
47
48
- var subject = new BsonChunkPool ( maxPoolSize , chunkSize ) ;
48
+ var subject = new BsonChunkPool ( maxChunkCount , chunkSize ) ;
49
49
50
50
var reflector = new Reflector ( subject ) ;
51
- subject . MaxPoolSize . Should ( ) . Be ( maxPoolSize ) ;
51
+ subject . MaxChunkCount . Should ( ) . Be ( maxChunkCount ) ;
52
52
subject . ChunkSize . Should ( ) . Be ( chunkSize ) ;
53
53
reflector . _disposed . Should ( ) . BeFalse ( ) ;
54
54
}
@@ -64,11 +64,11 @@ public void constructor_should_throw_chunkSize_is_less_than_zero(
64
64
}
65
65
66
66
[ Test ]
67
- public void constructor_should_throw_whenMaxPoolSize_is_less_than_zero ( )
67
+ public void constructor_should_throw_when_MaxChunkCount_is_less_than_zero ( )
68
68
{
69
69
Action action = ( ) => new BsonChunkPool ( - 1 , 16 ) ;
70
70
71
- action . ShouldThrow < ArgumentOutOfRangeException > ( ) . And . ParamName . Should ( ) . Be ( "maxPoolSize " ) ;
71
+ action . ShouldThrow < ArgumentOutOfRangeException > ( ) . And . ParamName . Should ( ) . Be ( "maxChunkCount " ) ;
72
72
}
73
73
74
74
[ Test ]
@@ -77,7 +77,7 @@ public void Default_get_should_return_expected_result()
77
77
var result = BsonChunkPool . Default ;
78
78
79
79
result . ChunkSize . Should ( ) . Be ( 64 * 1024 ) ;
80
- result . MaxPoolSize . Should ( ) . Be ( 8192 ) ;
80
+ result . MaxChunkCount . Should ( ) . Be ( 8192 ) ;
81
81
}
82
82
83
83
[ Test ]
@@ -166,11 +166,11 @@ public void GetChunk_should_throw_when_subject_is_disposed()
166
166
}
167
167
168
168
[ Test ]
169
- public void MaxPoolSize_get_should_return_expected_result ( )
169
+ public void MaxChunkCount_get_should_return_expected_result ( )
170
170
{
171
171
var subject = new BsonChunkPool ( 1 , 16 ) ;
172
172
173
- var result = subject . MaxPoolSize ;
173
+ var result = subject . MaxChunkCount ;
174
174
175
175
result . Should ( ) . Be ( 1 ) ;
176
176
}
@@ -254,7 +254,7 @@ public void Dispose_should_return_chunk_to_the_pool()
254
254
255
255
subject . Dispose ( ) ;
256
256
257
- pool . PoolSize . Should ( ) . Be ( 1 ) ;
257
+ pool . ChunkCount . Should ( ) . Be ( 1 ) ;
258
258
}
259
259
260
260
[ Test ]
@@ -284,11 +284,11 @@ public void Dispose_should_return_chunk_to_the_pool_after_all_handles_have_been_
284
284
285
285
foreach ( var handle in handles )
286
286
{
287
- pool . PoolSize . Should ( ) . Be ( 0 ) ;
287
+ pool . ChunkCount . Should ( ) . Be ( 0 ) ;
288
288
handle . Dispose ( ) ;
289
289
}
290
290
291
- pool . PoolSize . Should ( ) . Be ( 1 ) ;
291
+ pool . ChunkCount . Should ( ) . Be ( 1 ) ;
292
292
}
293
293
294
294
[ Test ]
0 commit comments