@@ -56,7 +56,7 @@ internal class NamedSelectClass
5656 /// <summary>
5757 /// A test evaluator that ensures DateTimeOffset, DateTime, and TimeOnly values are msec resolution.
5858 /// </summary>
59- private readonly Func < EquivalencyAssertionOptions < ClientKitchenSink > , EquivalencyAssertionOptions < ClientKitchenSink > > entityEquivalentOptions = ( options ) =>
59+ private readonly Func < EquivalencyOptions < ClientKitchenSink > , EquivalencyOptions < ClientKitchenSink > > entityEquivalentOptions = ( options ) =>
6060 {
6161 options . Using < DateTimeOffset > ( ctx => ctx . Subject . Should ( ) . BeCloseTo ( ctx . Expectation , 1 . Milliseconds ( ) ) ) . WhenTypeIs < DateTimeOffset > ( ) ;
6262 options . Using < DateTime > ( ctx => ctx . Subject . Should ( ) . BeCloseTo ( ctx . Expectation , 1 . Milliseconds ( ) ) ) . WhenTypeIs < DateTime > ( ) ;
@@ -267,7 +267,7 @@ public async Task AddAsync_Conflict(HttpStatusCode code)
267267 {
268268 this . mockHandler . Responses . Add ( GetSuccessfulResponse ( this . successfulKitchenSink , code ) ) ;
269269 ClientKitchenSink entity = new ( ) { Id = "1" , StringValue = "abc" } ;
270- string expected = """{"stringValue":"abc","id":"1"}""" ;
270+ const string expected = """{"stringValue":"abc","id":"1"}""" ;
271271 DatasyncServiceClient < ClientKitchenSink > client = GetMockClient < ClientKitchenSink > ( ) ;
272272
273273 Func < Task > act = async ( ) => _ = await client . AddAsync ( entity , new DatasyncServiceOptions ( ) ) ;
@@ -1204,7 +1204,7 @@ public async Task Query_OnePageOfItems()
12041204 [ Fact ]
12051205 public async Task Query_TwoPagesOfItems ( )
12061206 {
1207- Page < ClientKitchenSink >
1207+ Page < ClientKitchenSink >
12081208 page1 = CreatePage ( 5 , null , "$skip=5" ) ,
12091209 page2 = CreatePage ( 5 ) ;
12101210
@@ -1436,7 +1436,7 @@ public async Task RemoveAsync_SetsVersion()
14361436 request . Should ( ) . NotBeNull ( ) ;
14371437 request . Method . Should ( ) . Be ( HttpMethod . Delete ) ;
14381438 request . RequestUri . ToString ( ) . Should ( ) . Be ( $ "http://localhost/tables/kitchensink/{ id } ") ;
1439- request . Should ( ) . HaveHeader ( "If-Match" , "\" abcdefg1234\" " ) ;
1439+ request . Headers . Should ( ) . Contain ( x => x . Key == "If-Match" && x . Value . First ( ) == "\" abcdefg1234\" " ) ;
14401440
14411441 response . Should ( ) . NotBeNull ( ) ;
14421442 response . HasContent . Should ( ) . BeFalse ( ) ;
@@ -1458,7 +1458,7 @@ public async Task RemoveAsync_Extn_Unforced_SetsVersion()
14581458 request . Should ( ) . NotBeNull ( ) ;
14591459 request . Method . Should ( ) . Be ( HttpMethod . Delete ) ;
14601460 request . RequestUri . ToString ( ) . Should ( ) . Be ( $ "http://localhost/tables/kitchensink/{ entity . Id } ") ;
1461- request . Should ( ) . HaveHeader ( "If-Match" , "\" abcdefg1234\" " ) ;
1461+ request . Headers . Should ( ) . Contain ( x => x . Key == "If-Match" && x . Value . First ( ) == "\" abcdefg1234\" " ) ;
14621462
14631463 response . Should ( ) . NotBeNull ( ) ;
14641464 response . HasContent . Should ( ) . BeFalse ( ) ;
@@ -1480,7 +1480,7 @@ public async Task RemoveAsync_Extn2_SetsVersion()
14801480 request . Should ( ) . NotBeNull ( ) ;
14811481 request . Method . Should ( ) . Be ( HttpMethod . Delete ) ;
14821482 request . RequestUri . ToString ( ) . Should ( ) . Be ( $ "http://localhost/tables/kitchensink/{ entity . Id } ") ;
1483- request . Should ( ) . HaveHeader ( "If-Match" , "\" abcdefg1234\" " ) ;
1483+ request . Headers . Should ( ) . Contain ( x => x . Key == "If-Match" && x . Value . First ( ) == "\" abcdefg1234\" " ) ;
14841484
14851485 response . Should ( ) . NotBeNull ( ) ;
14861486 response . HasContent . Should ( ) . BeFalse ( ) ;
@@ -1502,7 +1502,7 @@ public async Task RemoveAsync_Extn_Forced_SetsVersion()
15021502 request . Should ( ) . NotBeNull ( ) ;
15031503 request . Method . Should ( ) . Be ( HttpMethod . Delete ) ;
15041504 request . RequestUri . ToString ( ) . Should ( ) . Be ( $ "http://localhost/tables/kitchensink/{ entity . Id } ") ;
1505- request . Should ( ) . NotHaveHeader ( "If-Match" ) ;
1505+ request . Headers . Should ( ) . NotContain ( x => x . Key == "If-Match" ) ;
15061506
15071507 response . Should ( ) . NotBeNull ( ) ;
15081508 response . HasContent . Should ( ) . BeFalse ( ) ;
@@ -1745,7 +1745,7 @@ public async Task ReplaceAsync_SetsVersion()
17451745 request . Should ( ) . NotBeNull ( ) ;
17461746 request . Method . Should ( ) . Be ( HttpMethod . Put ) ;
17471747 request . RequestUri . ToString ( ) . Should ( ) . Be ( $ "http://localhost/tables/kitchensink/{ entity . Id } ") ;
1748- request . Should ( ) . HaveHeader ( "If-Match" , "\" abcdefg1234\" " ) ;
1748+ request . Headers . Should ( ) . Contain ( x => x . Key == "If-Match" && x . Value . First ( ) == "\" abcdefg1234\" " ) ;
17491749 ( await request . Content . ReadAsStringAsync ( ) ) . Should ( ) . Be ( expected ) ;
17501750
17511751 response . Should ( ) . NotBeNull ( ) ;
@@ -1771,7 +1771,7 @@ public async Task ReplaceAsync_Extn_Forced_SetsVersion()
17711771 request . Should ( ) . NotBeNull ( ) ;
17721772 request . Method . Should ( ) . Be ( HttpMethod . Put ) ;
17731773 request . RequestUri . ToString ( ) . Should ( ) . Be ( $ "http://localhost/tables/kitchensink/{ entity . Id } ") ;
1774- request . Should ( ) . NotHaveHeader ( "If-Match" ) ;
1774+ request . Headers . Should ( ) . NotContain ( x => x . Key == "If-Match" ) ;
17751775 ( await request . Content . ReadAsStringAsync ( ) ) . Should ( ) . Be ( expected ) ;
17761776
17771777 response . Should ( ) . NotBeNull ( ) ;
@@ -1797,7 +1797,7 @@ public async Task ReplaceAsync_Extn_Unforced_SetsVersion()
17971797 request . Should ( ) . NotBeNull ( ) ;
17981798 request . Method . Should ( ) . Be ( HttpMethod . Put ) ;
17991799 request . RequestUri . ToString ( ) . Should ( ) . Be ( $ "http://localhost/tables/kitchensink/{ entity . Id } ") ;
1800- request . Should ( ) . HaveHeader ( "If-Match" , "\" abcdefg1234\" " ) ;
1800+ request . Headers . Should ( ) . Contain ( x => x . Key == "If-Match" && x . Value . First ( ) == "\" abcdefg1234\" " ) ;
18011801 ( await request . Content . ReadAsStringAsync ( ) ) . Should ( ) . Be ( expected ) ;
18021802
18031803 response . Should ( ) . NotBeNull ( ) ;
@@ -1823,7 +1823,7 @@ public async Task ReplaceAsync_Extn_Default_SetsVersion()
18231823 request . Should ( ) . NotBeNull ( ) ;
18241824 request . Method . Should ( ) . Be ( HttpMethod . Put ) ;
18251825 request . RequestUri . ToString ( ) . Should ( ) . Be ( $ "http://localhost/tables/kitchensink/{ entity . Id } ") ;
1826- request . Should ( ) . HaveHeader ( "If-Match" , "\" abcdefg1234\" " ) ;
1826+ request . Headers . Should ( ) . Contain ( x => x . Key == "If-Match" && x . Value . First ( ) == "\" abcdefg1234\" " ) ;
18271827 ( await request . Content . ReadAsStringAsync ( ) ) . Should ( ) . Be ( expected ) ;
18281828
18291829 response . Should ( ) . NotBeNull ( ) ;
@@ -3561,10 +3561,12 @@ public void Linq_Where_String_Contains()
35613561 [ Fact ]
35623562 public void Linq_Where_EndsWith_ToUpper ( )
35633563 {
3564+ #pragma warning disable RCS1155 // Use StringComparison when comparing strings
35643565 ExecuteQueryTest (
35653566 x => x . Where ( m => m . StringValue . ToUpperInvariant ( ) == "ER" ) ,
35663567 "$filter=(toupper(stringValue) eq 'ER')"
35673568 ) ;
3569+ #pragma warning restore RCS1155 // Use StringComparison when comparing strings
35683570 }
35693571
35703572 [ Fact ]
0 commit comments