55
66namespace Devlooped . Tests ;
77
8- public record XPathTests ( ITestOutputHelper Console )
8+ public class XPathTests ( ITestOutputHelper output )
99{
1010 [ InlineData ( "foo" , ".//foo" ) ]
1111 [ InlineData ( ".foo" , ".//*[contains(concat(\" \" ,normalize-space(@class),\" \" ),\" foo \" )]" ) ]
@@ -20,7 +20,7 @@ public void ToXPath(string css, string xpath)
2020 {
2121 var result = Parser . Parse ( css ) . ToXPath ( ) ;
2222 if ( result != xpath )
23- Console . WriteLine ( result ) ;
23+ output . WriteLine ( result ) ;
2424
2525 Assert . Equal ( xpath , result ) ;
2626 }
@@ -75,7 +75,7 @@ public void EvaluatePageHtml(string expression, string expected)
7575 . Select ( x => x . Value ) ) ;
7676
7777 if ( ! expected . Equals ( actual ) )
78- Console . WriteLine ( $ "{ expression } > { Parser . Parse ( expression ) . ToXPath ( ) } ") ;
78+ output . WriteLine ( $ "{ expression } > { Parser . Parse ( expression ) . ToXPath ( ) } ") ;
7979
8080 Assert . Equal ( expected , actual ) ;
8181 }
@@ -126,6 +126,6 @@ internal void AttributeSelectorNormalizesQuotes(string expression, string xpath)
126126 public void RenderExpression ( )
127127 {
128128 var expression = "*[text()$=\" to go\" ]" ;
129- Console . WriteLine ( Parser . Parse ( expression ) . ToXPath ( ) ) ;
129+ output . WriteLine ( Parser . Parse ( expression ) . ToXPath ( ) ) ;
130130 }
131131}
0 commit comments