File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
jnosql-solr/src/test/java/org/eclipse/jnosql/databases/solr/integration Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1616
1717
1818import jakarta .inject .Inject ;
19+ import org .assertj .core .api .SoftAssertions ;
1920import org .eclipse .jnosql .databases .solr .communication .DocumentDatabase ;
2021import org .eclipse .jnosql .databases .solr .communication .SolrDocumentConfigurations ;
2122import org .eclipse .jnosql .databases .solr .mapping .SolrTemplate ;
@@ -109,5 +110,21 @@ public void shouldDelete() {
109110 .isNotNull ().isEmpty ();
110111 }
111112
113+ @ Test
114+ void shouldUpdateNullValues (){
115+ var book = new Book (randomUUID ().toString (), "Effective Java" , 1 );
116+ template .insert (book );
117+ template .update (new Book (book .id (), null , 2 ));
118+ Optional <Book > optional = template .select (Book .class ).where ("id" )
119+ .eq (book .id ()).singleResult ();
120+ SoftAssertions .assertSoftly (softly -> {
121+ softly .assertThat (optional ).isPresent ();
122+ softly .assertThat (optional ).get ().extracting (Book ::title ).isNull ();
123+ softly .assertThat (optional ).get ().extracting (Book ::edition ).isEqualTo (2 );
124+ });
125+ }
126+
127+
128+
112129
113130}
You can’t perform that action at this time.
0 commit comments