@@ -236,29 +236,29 @@ public void ShouldBeAbleToExecuteAsynchronousScripts()
236236
237237 IWebElement typer = driver . FindElement ( By . Name ( "typer" ) ) ;
238238 typer . SendKeys ( "bob" ) ;
239- Assert . AreEqual ( "bob" , typer . GetAttribute ( "value ") ) ;
239+ Assert . That ( typer . GetAttribute ( "value" ) , Is . EqualTo ( "bob ") ) ;
240240
241241 driver . FindElement ( By . Id ( "red" ) ) . Click ( ) ;
242242 driver . FindElement ( By . Name ( "submit" ) ) . Click ( ) ;
243243
244- Assert . AreEqual ( 1 , GetNumberOfDivElements ( ) , "There should only be 1 DIV at this point, which is used for the butter message" ) ;
244+ Assert . That ( GetNumberOfDivElements ( ) , Is . EqualTo ( 1 ) , "There should only be 1 DIV at this point, which is used for the butter message" ) ;
245245
246246 driver . Manage ( ) . Timeouts ( ) . AsynchronousJavaScript = TimeSpan . FromSeconds ( 10 ) ;
247247 string text = ( string ) executor . ExecuteAsyncScript (
248248 "var callback = arguments[arguments.length - 1];"
249249 + "window.registerListener(arguments[arguments.length - 1]);" ) ;
250- Assert . AreEqual ( "bob" , text ) ;
251- Assert . AreEqual ( "" , typer . GetAttribute ( "value" ) ) ;
250+ Assert . That ( text , Is . EqualTo ( "bob" ) ) ;
251+ Assert . That ( typer . GetAttribute ( "value" ) , Is . Empty ) ;
252252
253- Assert . AreEqual ( 2 , GetNumberOfDivElements ( ) , "There should be 1 DIV (for the butter message) + 1 DIV (for the new label)" ) ;
253+ Assert . That ( GetNumberOfDivElements ( ) , Is . EqualTo ( 2 ) , "There should be 1 DIV (for the butter message) + 1 DIV (for the new label)" ) ;
254254 }
255255
256256 [ Test ]
257257 public void ShouldBeAbleToPassMultipleArgumentsToAsyncScripts ( )
258258 {
259259 driver . Url = ajaxyPage ;
260260 long result = ( long ) executor . ExecuteAsyncScript ( "arguments[arguments.length - 1](arguments[0] + arguments[1]);" , 1 , 2 ) ;
261- Assert . AreEqual ( 3 , result ) ;
261+ Assert . That ( result , Is . EqualTo ( 3 ) ) ;
262262 }
263263
264264 [ Test ]
@@ -290,7 +290,7 @@ public void ShouldBeAbleToMakeXMLHttpRequestsAndWaitForTheResponse()
290290 driver . Url = ajaxyPage ;
291291 driver . Manage ( ) . Timeouts ( ) . AsynchronousJavaScript = TimeSpan . FromSeconds ( 3 ) ;
292292 string response = ( string ) executor . ExecuteAsyncScript ( script , sleepingPage + "?time=2" ) ;
293- Assert . AreEqual ( "<html><head><title>Done</title></head><body>Slept for 2s</body></html>" , response . Trim ( ) ) ;
293+ Assert . That ( response . Trim ( ) , Is . EqualTo ( "<html><head><title>Done</title></head><body>Slept for 2s</body></html>" ) ) ;
294294 }
295295
296296 [ Test ]
0 commit comments