File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
src/Tests/Nest.Tests.Unit/Reproduce Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Linq ;
4+ using System . Reflection ;
5+ using FluentAssertions ;
6+ using Nest . Tests . MockData . Domain ;
7+ using NUnit . Framework ;
8+
9+ namespace Nest . Tests . Unit . Reproduce
10+ {
11+ /// <summary>
12+ /// tests to reproduce reported errors
13+ /// </summary>
14+ [ TestFixture ]
15+ public class Reproduce1440Tests : BaseJsonTests
16+ {
17+ [ Test ]
18+ public void CountShouldNotThrowWhenNoDefaultIndexSpecified ( )
19+ {
20+ var client = new ElasticClient ( ) ;
21+ var request = client . Count < ElasticsearchProject > ( ) ;
22+ var path = new Uri ( request . ConnectionStatus . RequestUrl ) . AbsolutePath ;
23+ path . Should ( ) . Be ( "/_all/elasticsearchprojects/_count" ) ;
24+ request = client . Count < ElasticsearchProject > ( c=> c . Index ( "x" ) ) ;
25+ path = new Uri ( request . ConnectionStatus . RequestUrl ) . AbsolutePath ;
26+ path . Should ( ) . Be ( "/x/elasticsearchprojects/_count" ) ;
27+ }
28+
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments