@@ -37,15 +37,19 @@ public void SetUp()
3737 [ TestCase ( "Nested Model CharNullable" , SortDirectionsEnum . Desc ) ]
3838 public void Sort_SholdWorkAppropriateForTextTypes ( string columnName , SortDirectionsEnum direction )
3939 {
40- this . navigator . AllTypesDataPage ( ) . GoTo ( ) ;
41- var tableElement = new TableElement ( "table" , this . driver ) ;
42- tableElement . ClickSortButton ( columnName , direction ) ;
40+ ExceptionsHandler . Hande ( ( ) =>
41+ {
42+ this . navigator . AllTypesDataPage ( ) . GoTo ( ) ;
43+ var tableElement = new TableElement ( "table" , this . driver ) ;
44+ tableElement . ClickSortButton ( columnName , direction ) ;
4345
44- // Assert that rows are in correct order for the first page
45- AssertTextPropertyOrder ( columnName , direction , tableElement ) ;
46- tableElement . GoToLastPage ( ) ;
47- // Assert that rows are in correct order for the last page
48- AssertTextPropertyOrder ( columnName , direction , tableElement ) ;
46+ // Assert that rows are in correct order for the first page
47+ AssertTextPropertyOrder ( columnName , direction , tableElement ) ;
48+ tableElement . GoToLastPage ( ) ;
49+ // Assert that rows are in correct order for the last page
50+ AssertTextPropertyOrder ( columnName , direction , tableElement ) ;
51+ } ,
52+ this . driver ) ;
4953 }
5054
5155 [ Test ]
@@ -204,30 +208,38 @@ public void Sort_SholdWorkAppropriateForTextTypes(string columnName, SortDirecti
204208 [ TestCase ( nameof ( AllTypesModel . NestedModel ) + "." + nameof ( AllTypesModel . CharNullable ) , SortDirectionsEnum . Desc , typeof ( char ? ) ) ]
205209 public void Sort_SholdWorkAppropriateForNonTextTypes ( string columnName , SortDirectionsEnum direction , Type propertyType )
206210 {
207- this . navigator . AllTypesDataPage ( ) . GoTo ( ) ;
208- var tableElement = new TableElement ( "table" , this . driver ) ;
209- string columnHeader = columnName . StartsWith ( "NestedModel" ) ? this . GetHeaderForNestedModel ( columnName ) : columnName ;
210- tableElement . ClickSortButton ( columnHeader , direction ) ;
211+ ExceptionsHandler . Hande ( ( ) =>
212+ {
213+ this . navigator . AllTypesDataPage ( ) . GoTo ( ) ;
214+ var tableElement = new TableElement ( "table" , this . driver ) ;
215+ string columnHeader = columnName . StartsWith ( "NestedModel" ) ? this . GetHeaderForNestedModel ( columnName ) : columnName ;
216+ tableElement . ClickSortButton ( columnHeader , direction ) ;
211217
212- AssertNonTextPropertyOrder ( columnName , columnHeader , direction , propertyType , tableElement ) ;
213- tableElement . GoToLastPage ( ) ;
214- AssertNonTextPropertyOrder ( columnName , columnHeader , direction , propertyType , tableElement ) ;
218+ AssertNonTextPropertyOrder ( columnName , columnHeader , direction , propertyType , tableElement ) ;
219+ tableElement . GoToLastPage ( ) ;
220+ AssertNonTextPropertyOrder ( columnName , columnHeader , direction , propertyType , tableElement ) ;
221+ } ,
222+ this . driver ) ;
215223 }
216224
217225 [ Test ]
218226 public void Sort_SholdWorkWithSubsecuentPropertiesSortOperations ( )
219227 {
220- string firstColumnName = "Integer" ;
221- string secondColumnName = "DoubleProperty" ;
228+ ExceptionsHandler . Hande ( ( ) =>
229+ {
230+ string firstColumnName = "Integer" ;
231+ string secondColumnName = "DoubleProperty" ;
222232
223- this . navigator . AllTypesDataPage ( ) . GoTo ( ) ;
224- var tableElement = new TableElement ( "table" , this . driver ) ;
225- tableElement . ClickSortButton ( firstColumnName , SortDirectionsEnum . Asc ) ;
226- tableElement . ClickSortButton ( secondColumnName , SortDirectionsEnum . Asc ) ;
233+ this . navigator . AllTypesDataPage ( ) . GoTo ( ) ;
234+ var tableElement = new TableElement ( "table" , this . driver ) ;
235+ tableElement . ClickSortButton ( firstColumnName , SortDirectionsEnum . Asc ) ;
236+ tableElement . ClickSortButton ( secondColumnName , SortDirectionsEnum . Asc ) ;
227237
228- AssertNonTextPropertyOrder ( secondColumnName , secondColumnName , SortDirectionsEnum . Asc , typeof ( double ) , tableElement ) ;
229- tableElement . GoToLastPage ( ) ;
230- AssertNonTextPropertyOrder ( secondColumnName , secondColumnName , SortDirectionsEnum . Asc , typeof ( double ) , tableElement ) ;
238+ AssertNonTextPropertyOrder ( secondColumnName , secondColumnName , SortDirectionsEnum . Asc , typeof ( double ) , tableElement ) ;
239+ tableElement . GoToLastPage ( ) ;
240+ AssertNonTextPropertyOrder ( secondColumnName , secondColumnName , SortDirectionsEnum . Asc , typeof ( double ) , tableElement ) ;
241+ } ,
242+ this . driver ) ;
231243 }
232244
233245 private string GetHeaderForNestedModel ( string columnName )
0 commit comments