File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed 
main/java/org/springframework/test/web/reactive/server 
test/java/org/springframework/test/util Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public class JsonPathAssertions {
5656	/** 
5757	 * Applies {@link JsonPathExpectationsHelper#assertValue(String, Object)}. 
5858	 */ 
59- 	public  WebTestClient .BodyContentSpec  isEqualTo (Object  expectedValue ) {
59+ 	public  WebTestClient .BodyContentSpec  isEqualTo (@ Nullable   Object  expectedValue ) {
6060		this .pathHelper .assertValue (this .content , expectedValue );
6161		return  this .bodySpec ;
6262	}
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ class JsonPathExpectationsHelperTests {
5757				'whitespace':  '    ', 
5858				'emptyString': '', 
5959				'emptyArray':  [], 
60- 				'emptyMap':    {} 
60+ 				'emptyMap':    {}, 
61+ 				'nullValue':   null 
6162			}""" ;
6263
6364	private  static  final  String  SIMPSONS  = """ 
@@ -249,6 +250,11 @@ void assertValue() {
249250		new  JsonPathExpectationsHelper ("$.num" ).assertValue (CONTENT , 5 );
250251	}
251252
253+ 	@ Test 
254+ 	void  assertNullValue () {
255+ 		new  JsonPathExpectationsHelper ("$.nullValue" ).assertValue (CONTENT , (Object ) null );
256+ 	}
257+ 
252258	@ Test  // SPR-14498 
253259	void  assertValueWithNumberConversion () {
254260		new  JsonPathExpectationsHelper ("$.num" ).assertValue (CONTENT , 5.0 );
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments