File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/test/java/org/typesense/api Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11package org .typesense .api ;
22
3- import java .util .Map ;
3+ import java .util .HashMap ;
44
55import org .junit .jupiter .api .AfterEach ;
66import static org .junit .jupiter .api .Assertions .assertEquals ;
@@ -32,12 +32,13 @@ void tearDown() throws Exception {
3232
3333 @ Test
3434 void testCreate () throws Exception {
35+ HashMap <String , Object > eventData = new HashMap <>();
36+ eventData .put ("q" , "running shoes" );
37+ eventData .put ("user_id" , "1234" );
3538 AnalyticsEventCreateSchema analyticsEvent = new AnalyticsEventCreateSchema ()
3639 .type ("search" )
3740 .name ("products_search_event" )
38- .data (Map .of (
39- "q" , "running shoes" ,
40- "user_id" , "1234" ));
41+ .data (eventData );
4142
4243 AnalyticsEventCreateResponse result = this .client .analytics ().events ().create (analyticsEvent );
4344 assertNotNull (result );
You can’t perform that action at this time.
0 commit comments