@@ -131,6 +131,35 @@ public async Task GetServiceStatistics()
131131 Assert . NotZero ( response . Value . Counters . IndexCounter . Usage ) ;
132132 }
133133
134+ [ Test ]
135+ [ ServiceVersion ( Min = SearchClientOptions . ServiceVersion . V2025_03_01_Preview ) ]
136+ public async Task GetIndexStatsSummary ( )
137+ {
138+ await using SearchResources resources = await SearchResources . GetSharedHotelsIndexAsync ( this ) ;
139+
140+ SearchIndexClient client = resources . GetIndexClient ( ) ;
141+ Response < ListIndexStatsSummary > response = await client . GetIndexStatsSummaryAsync ( ) ;
142+ Assert . AreEqual ( 200 , response . GetRawResponse ( ) . Status ) ;
143+ Assert . IsNotNull ( response . Value ) ;
144+ Assert . IsNotNull ( response . Value . IndexesStatistics ) ;
145+ Assert . AreEqual ( 1 , response . Value . IndexesStatistics . Count ) ;
146+ Assert . AreEqual ( resources . IndexName , response . Value . IndexesStatistics [ 0 ] . Name ) ;
147+ }
148+
149+ [ Test ]
150+ [ ServiceVersion ( Min = SearchClientOptions . ServiceVersion . V2025_03_01_Preview ) ]
151+ public async Task GetIndexStatsSummaryWithNoIndexes ( )
152+ {
153+ await using SearchResources resources = SearchResources . CreateWithNoIndexes ( this ) ;
154+
155+ SearchIndexClient client = resources . GetIndexClient ( ) ;
156+ Response < ListIndexStatsSummary > response = await client . GetIndexStatsSummaryAsync ( ) ;
157+ Assert . AreEqual ( 200 , response . GetRawResponse ( ) . Status ) ;
158+ Assert . IsNotNull ( response . Value ) ;
159+ Assert . IsNotNull ( response . Value . IndexesStatistics ) ;
160+ Assert . AreEqual ( 0 , response . Value . IndexesStatistics . Count ) ;
161+ }
162+
134163 [ Test ]
135164 [ SyncOnly ]
136165 public void CreateIndexParameterValidation ( )
0 commit comments