File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
spring-ai-core/src/test/java/org/springframework/ai/transformer/splitter Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1919import java .util .List ;
2020import java .util .Map ;
2121
22- import static org .assertj .core .api .Assertions .assertThat ;
2322import org .junit .jupiter .api .Test ;
2423
2524import org .springframework .ai .document .DefaultContentFormatter ;
2625import org .springframework .ai .document .Document ;
27- import org .springframework .ai .transformer .splitter .TextSplitter ;
26+
27+ import static org .assertj .core .api .Assertions .assertThat ;
2828
2929/**
3030 * @author Christian Tzolov
@@ -81,9 +81,9 @@ public void testSplitText() {
8181
8282 // Verify that the same, merged metadata is copied to all chunks.
8383 assertThat (chunks .get (0 ).getMetadata ()).isEqualTo (chunks .get (1 ).getMetadata ());
84- assertThat (chunks .get (0 ).getMetadata ()).isEqualTo (chunks .get (2 ).getMetadata ());
85- assertThat (chunks .get (0 ).getMetadata ()).isEqualTo ( chunks . get ( 3 ). getMetadata () );
86- assertThat (chunks .get (0 ).getMetadata ()).containsKeys ("key1" , " key2" , "key3" );
84+ assertThat (chunks .get (2 ).getMetadata ()).isEqualTo (chunks .get (3 ).getMetadata ());
85+ assertThat (chunks .get (0 ).getMetadata ()).containsKeys ( "key1" , "key2" ). doesNotContainKeys ( "key3" );
86+ assertThat (chunks .get (2 ).getMetadata ()).containsKeys ("key2" , "key3" ). doesNotContainKeys ( "key1 " );
8787
8888 // Verify that the content formatters are copied from the parents to the chunks.
8989 // doc1 -> chunk0, chunk1 and doc2 -> chunk2, chunk3
You can’t perform that action at this time.
0 commit comments