tag:blogger.com,1999:blog-2115697108381349491.post1488063828127042815..comments2023-02-27T05:26:48.991-05:00Comments on Names are Hard: Asynchronous unit tests in FlexUnit 4Anonymoushttp://www.blogger.com/profile/10513366522572420724noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-2115697108381349491.post-90330894082563242042012-11-08T01:57:13.363-05:002012-11-08T01:57:13.363-05:00Michael Labriola, is there a cheatsheet somewhere ...Michael Labriola, is there a cheatsheet somewhere of all hamcrest functions and not just the most common ones?Daganevhttps://www.blogger.com/profile/08022014644525719560noreply@blogger.comtag:blogger.com,1999:blog-2115697108381349491.post-73754795811743120432012-10-13T16:36:43.563-04:002012-10-13T16:36:43.563-04:00This is useful and truly helped. A sincere thank y...This is useful and truly helped. A sincere thank you!Michael Easterhttps://www.blogger.com/profile/14799771593145201161noreply@blogger.comtag:blogger.com,1999:blog-2115697108381349491.post-47080680279734807652010-06-16T17:14:11.196-04:002010-06-16T17:14:11.196-04:00Also, we support hamcrest assertions so you can do...Also, we support hamcrest assertions so you can do things like:<br /><br />assertThat( Math.PI, closeTo( 3.14, 0.01 ) );<br /><br />MikeMichael Labriolahttps://www.blogger.com/profile/00098181568872530004noreply@blogger.comtag:blogger.com,1999:blog-2115697108381349491.post-58454177434302963002010-06-16T17:12:25.241-04:002010-06-16T17:12:25.241-04:00There is an entire wiki full of content at docs.fl...There is an entire wiki full of content at docs.flexunit.orgMichael Labriolahttps://www.blogger.com/profile/00098181568872530004noreply@blogger.comtag:blogger.com,1999:blog-2115697108381349491.post-91084310770487331352010-02-24T09:50:53.730-05:002010-02-24T09:50:53.730-05:00Good to know, thanks!
Generally I've just bee...Good to know, thanks!<br /><br />Generally I've just been defining my check functions inline, instead of as a separate function, which lets me access the other data of the test directly (yay closures!), but that would be very helpful if creating a handler that was reused by multiple tests.Anonymoushttps://www.blogger.com/profile/10513366522572420724noreply@blogger.comtag:blogger.com,1999:blog-2115697108381349491.post-31055565854318657172010-02-24T05:20:49.237-05:002010-02-24T05:20:49.237-05:00The 2nd argument passed to the function from an As...The 2nd argument passed to the function from an Async.handleEvent method is the passThroughData:Object param.<br /><br />You can use it to pass a mock result object to check the actual event result against.<br /><br />ie.<br /><br />var expectedResult:Object = {errorId:12345};<br /><br />var check:Function = function(e:PersistErrorEvent, passThroughData:Object):void {<br /> Assert.assertEquals("Error id", passThroughData.errorId, e.errorId);<br /> }<br /><br />Async.handleEvent(this, monitor, PersistErrorEvent.ERROR_DETECTED,<br /> check, 500, expectedResult);Danhttps://www.blogger.com/profile/08799135266738429104noreply@blogger.com