File tree 1 file changed +17
-0
lines changed
src/Our.Umbraco.Look.Tests/QueryTests
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -81,5 +81,22 @@ public void Max_Results_Value_Invalid_Negative()
81
81
Assert . AreEqual ( 100 , lookResult . TotalItemCount ) ;
82
82
Assert . AreEqual ( 100 , lookResult . Matches . Count ( ) ) ;
83
83
}
84
+
85
+ [ TestMethod ]
86
+ public void Max_Results_Configuration_Value_Valid ( )
87
+ {
88
+ LookConfiguration . MaxResults = 3 ; // set first so that new lookQuerys will default to using this value
89
+
90
+ var lookQuery = new LookQuery ( TestHelper . GetSearchingContext ( ) ) ;
91
+
92
+ lookQuery . NameQuery = new NameQuery ( ) ; // set a query clause so it's acutally executed
93
+
94
+ var lookResult = lookQuery . Search ( ) ;
95
+
96
+ Assert . IsNotNull ( lookResult ) ;
97
+ Assert . IsTrue ( lookResult . Success ) ;
98
+ Assert . AreEqual ( 100 , lookResult . TotalItemCount ) ;
99
+ Assert . AreEqual ( 3 , lookResult . Matches . Count ( ) ) ;
100
+ }
84
101
}
85
102
}
You can’t perform that action at this time.
0 commit comments