@@ -115,21 +115,21 @@ public void ToString_UseResponseDirectiveValues_AllSerializedCorrectly()
115
115
116
116
cacheControl . NoCache = true ;
117
117
Assert . Equal ( "no-cache" , cacheControl . ToString ( ) ) ;
118
- cacheControl . NoCacheHeaders . Add ( "token1 " ) ;
119
- Assert . Equal ( "no-cache=\" token1 \" " , cacheControl . ToString ( ) ) ;
118
+ cacheControl . NoCacheHeaders . Add ( "PLACEHOLDER1 " ) ;
119
+ Assert . Equal ( "no-cache=\" PLACEHOLDER1 \" " , cacheControl . ToString ( ) ) ;
120
120
cacheControl . Public = true ;
121
- Assert . Equal ( "public, no-cache=\" token1 \" " , cacheControl . ToString ( ) ) ;
121
+ Assert . Equal ( "public, no-cache=\" PLACEHOLDER1 \" " , cacheControl . ToString ( ) ) ;
122
122
123
123
cacheControl = new CacheControlHeaderValue ( ) ;
124
124
cacheControl . Private = true ;
125
125
Assert . Equal ( "private" , cacheControl . ToString ( ) ) ;
126
- cacheControl . PrivateHeaders . Add ( "token2 " ) ;
127
- cacheControl . PrivateHeaders . Add ( "token3 " ) ;
128
- Assert . Equal ( "private=\" token2, token3 \" " , cacheControl . ToString ( ) ) ;
126
+ cacheControl . PrivateHeaders . Add ( "PLACEHOLDER2 " ) ;
127
+ cacheControl . PrivateHeaders . Add ( "PLACEHOLDER3 " ) ;
128
+ Assert . Equal ( "private=\" PLACEHOLDER2, PLACEHOLDER3 \" " , cacheControl . ToString ( ) ) ;
129
129
cacheControl . MustRevalidate = true ;
130
- Assert . Equal ( "must-revalidate, private=\" token2, token3 \" " , cacheControl . ToString ( ) ) ;
130
+ Assert . Equal ( "must-revalidate, private=\" PLACEHOLDER2, PLACEHOLDER3 \" " , cacheControl . ToString ( ) ) ;
131
131
cacheControl . ProxyRevalidate = true ;
132
- Assert . Equal ( "must-revalidate, proxy-revalidate, private=\" token2, token3 \" " , cacheControl . ToString ( ) ) ;
132
+ Assert . Equal ( "must-revalidate, proxy-revalidate, private=\" PLACEHOLDER2, PLACEHOLDER3 \" " , cacheControl . ToString ( ) ) ;
133
133
}
134
134
135
135
[ Fact ]
@@ -218,21 +218,21 @@ public void GetHashCode_CompareCollectionFieldsSet_MatchExpectation()
218
218
var cacheControl5 = new CacheControlHeaderValue ( ) ;
219
219
220
220
cacheControl1 . NoCache = true ;
221
- cacheControl1 . NoCacheHeaders . Add ( "token2 " ) ;
221
+ cacheControl1 . NoCacheHeaders . Add ( "PLACEHOLDER2 " ) ;
222
222
223
223
cacheControl2 . NoCache = true ;
224
- cacheControl2 . NoCacheHeaders . Add ( "token1 " ) ;
225
- cacheControl2 . NoCacheHeaders . Add ( "token2 " ) ;
224
+ cacheControl2 . NoCacheHeaders . Add ( "PLACEHOLDER1 " ) ;
225
+ cacheControl2 . NoCacheHeaders . Add ( "PLACEHOLDER2 " ) ;
226
226
227
227
CompareHashCodes ( cacheControl1 , cacheControl2 , false ) ;
228
228
229
- cacheControl1 . NoCacheHeaders . Add ( "token1 " ) ;
229
+ cacheControl1 . NoCacheHeaders . Add ( "PLACEHOLDER1 " ) ;
230
230
CompareHashCodes ( cacheControl1 , cacheControl2 , true ) ;
231
231
232
232
// Since NoCache and Private generate different hash codes, even if NoCacheHeaders and PrivateHeaders
233
233
// have the same values, the hash code will be different.
234
234
cacheControl3 . Private = true ;
235
- cacheControl3 . PrivateHeaders . Add ( "token2 " ) ;
235
+ cacheControl3 . PrivateHeaders . Add ( "PLACEHOLDER2 " ) ;
236
236
CompareHashCodes ( cacheControl1 , cacheControl3 , false ) ;
237
237
238
238
@@ -343,27 +343,27 @@ public void Equals_CompareCollectionFieldsSet_MatchExpectation()
343
343
var cacheControl6 = new CacheControlHeaderValue ( ) ;
344
344
345
345
cacheControl1 . NoCache = true ;
346
- cacheControl1 . NoCacheHeaders . Add ( "token2 " ) ;
346
+ cacheControl1 . NoCacheHeaders . Add ( "PLACEHOLDER2 " ) ;
347
347
348
348
Assert . False ( cacheControl1 . Equals ( null ) , "Compare with 'null'" ) ;
349
349
350
350
cacheControl2 . NoCache = true ;
351
- cacheControl2 . NoCacheHeaders . Add ( "token1 " ) ;
352
- cacheControl2 . NoCacheHeaders . Add ( "token2 " ) ;
351
+ cacheControl2 . NoCacheHeaders . Add ( "PLACEHOLDER1 " ) ;
352
+ cacheControl2 . NoCacheHeaders . Add ( "PLACEHOLDER2 " ) ;
353
353
354
354
CompareValues ( cacheControl1 ! , cacheControl2 , false ) ;
355
355
356
- cacheControl1 ! . NoCacheHeaders . Add ( "token1 " ) ;
356
+ cacheControl1 ! . NoCacheHeaders . Add ( "PLACEHOLDER1 " ) ;
357
357
CompareValues ( cacheControl1 , cacheControl2 , true ) ;
358
358
359
359
// Since NoCache and Private generate different hash codes, even if NoCacheHeaders and PrivateHeaders
360
360
// have the same values, the hash code will be different.
361
361
cacheControl3 . Private = true ;
362
- cacheControl3 . PrivateHeaders . Add ( "token2 " ) ;
362
+ cacheControl3 . PrivateHeaders . Add ( "PLACEHOLDER2 " ) ;
363
363
CompareValues ( cacheControl1 , cacheControl3 , false ) ;
364
364
365
365
cacheControl4 . Private = true ;
366
- cacheControl4 . PrivateHeaders . Add ( "token3 " ) ;
366
+ cacheControl4 . PrivateHeaders . Add ( "PLACEHOLDER3 " ) ;
367
367
CompareValues ( cacheControl3 , cacheControl4 , false ) ;
368
368
369
369
cacheControl5 . Extensions . Add ( new NameValueHeaderValue ( "custom" ) ) ;
@@ -386,9 +386,9 @@ public void TryParse_DifferentValidScenarios_AllReturnTrue()
386
386
387
387
expected = new CacheControlHeaderValue ( ) ;
388
388
expected . NoCache = true ;
389
- expected . NoCacheHeaders . Add ( "token1 " ) ;
390
- expected . NoCacheHeaders . Add ( "token2 " ) ;
391
- CheckValidTryParse ( "no-cache=\" token1, token2 \" " , expected ) ;
389
+ expected . NoCacheHeaders . Add ( "PLACEHOLDER1 " ) ;
390
+ expected . NoCacheHeaders . Add ( "PLACEHOLDER2 " ) ;
391
+ CheckValidTryParse ( "no-cache=\" PLACEHOLDER1, PLACEHOLDER2 \" " , expected ) ;
392
392
393
393
expected = new CacheControlHeaderValue ( ) ;
394
394
expected . NoStore = true ;
@@ -406,12 +406,12 @@ public void TryParse_DifferentValidScenarios_AllReturnTrue()
406
406
expected = new CacheControlHeaderValue ( ) ;
407
407
expected . Public = true ;
408
408
expected . Private = true ;
409
- expected . PrivateHeaders . Add ( "token1 " ) ;
409
+ expected . PrivateHeaders . Add ( "PLACEHOLDER1 " ) ;
410
410
expected . MustRevalidate = true ;
411
411
expected . ProxyRevalidate = true ;
412
412
expected . Extensions . Add ( new NameValueHeaderValue ( "c" , "d" ) ) ;
413
413
expected . Extensions . Add ( new NameValueHeaderValue ( "a" , "b" ) ) ;
414
- CheckValidTryParse ( ",public, , private=\" token1 \" , must-revalidate, c=d, proxy-revalidate, a=b" , expected ) ;
414
+ CheckValidTryParse ( ",public, , private=\" PLACEHOLDER1 \" , must-revalidate, c=d, proxy-revalidate, a=b" , expected ) ;
415
415
416
416
expected = new CacheControlHeaderValue ( ) ;
417
417
expected . Private = true ;
0 commit comments