|
17 | 17 |
|
18 | 18 | import org.apache.commons.lang3.tuple.Pair; |
19 | 19 | import org.assertj.core.api.Assertions; |
| 20 | +import org.hamcrest.CoreMatchers; |
20 | 21 | import org.junit.Before; |
21 | 22 | import org.junit.BeforeClass; |
22 | 23 | import org.junit.Ignore; |
@@ -307,8 +308,8 @@ public void testInlineScriptClientError() throws Exception |
307 | 308 | "mothership", rowMap.get("PageflowName")); |
308 | 309 | checker().verifyEquals("Expect confirmation that the action is app", |
309 | 310 | "clientException", rowMap.get("PageflowAction")); |
310 | | - checker().verifyEquals("Unexpected exception message", |
311 | | - "TypeError: x is undefined", rowMap.get("ExceptionMessage")); |
| 311 | + checker().verifyThat("Unexpected exception message", |
| 312 | + rowMap.get("ExceptionMessage"), CoreMatchers.containsString("x is undefined")); |
312 | 313 | checker().verifyEquals("Expect confirmation that the user is correct", |
313 | 314 | getCurrentUser(), rowMap.get("Username")); |
314 | 315 | checker().verifyEquals("expext the referring URL to be the page from which we caused this", |
@@ -340,8 +341,8 @@ public void testResourceScriptClientError() throws Exception |
340 | 341 | "mothership", rowMap.get("PageflowName")); |
341 | 342 | checker().verifyEquals("Expect confirmation that the action is app", |
342 | 343 | "clientException", rowMap.get("PageflowAction")); |
343 | | - checker().verifyEquals("Unexpected exception message", |
344 | | - "TypeError: x is undefined", rowMap.get("ExceptionMessage")); |
| 344 | + checker().verifyThat("Unexpected exception message", |
| 345 | + rowMap.get("ExceptionMessage"), CoreMatchers.containsString("x is undefined")); |
345 | 346 | checker().verifyEquals("Expect confirmation that the user is correct", |
346 | 347 | getCurrentUser(), rowMap.get("Username")); |
347 | 348 | checker().verifyEquals("expext the referring URL to be the page from which we caused this", |
@@ -373,8 +374,8 @@ public void testNestedResourceScriptClientError() throws Exception |
373 | 374 | "mothership", rowMap.get("PageflowName")); |
374 | 375 | checker().verifyEquals("Expect confirmation that the action is app", |
375 | 376 | "clientException", rowMap.get("PageflowAction")); |
376 | | - checker().verifyEquals("Unexpected exception message", |
377 | | - "TypeError: x is undefined", rowMap.get("ExceptionMessage")); |
| 377 | + checker().verifyThat("Unexpected exception message", |
| 378 | + rowMap.get("ExceptionMessage"), CoreMatchers.containsString("x is undefined")); |
378 | 379 | checker().verifyEquals("Expect confirmation that the user is correct", |
379 | 380 | getCurrentUser(), rowMap.get("Username")); |
380 | 381 | checker().verifyEquals("expext the referring URL to be the page from which we caused this", |
@@ -406,8 +407,8 @@ public void testAsyncScriptClientError() throws Exception |
406 | 407 | "mothership", rowMap.get("PageflowName")); |
407 | 408 | checker().verifyEquals("Expect confirmation that the action is clientException", |
408 | 409 | "clientException", rowMap.get("PageflowAction")); |
409 | | - checker().verifyEquals("Unexpected exception message", |
410 | | - "TypeError: result.does is undefined", rowMap.get("ExceptionMessage")); |
| 410 | + checker().verifyThat("Unexpected exception message", |
| 411 | + rowMap.get("ExceptionMessage"), CoreMatchers.containsString("result.does is undefined")); |
411 | 412 | checker().verifyEquals("Expect confirmation that the user is correct", |
412 | 413 | getCurrentUser(), rowMap.get("Username")); |
413 | 414 | checker().verifyEquals("expect the referring URL to be the page from which we caused this", |
|
0 commit comments