EasyMock 101

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites & 1 Group

    EasyMock 101 - Presentation Transcript

    1. EasyMock 101 A 30 Minute Review by Matthew McCullough
    2. ❶ What Is Mocking?
    3. Are You Mocking Me? • A fake object • Allows for more modular testing • Records and verifies expectations of calls
    4. ❷ Creating A Mock
    5. IEnumeration iEnumIntfMock = EasyMock.createMock(EnumeratedAttribute.class);
    6. ❸ Expectations
    7. Expecting A Lot • Expect method is called on mock • Expect sequence of method calls on mock (call createStrictMock()) • Expect parameters to methods calls on mock
    8. Expect A Call EasyMock.expect(iEnumIntfMock.getNumberOfRows() );
    9. Expect A Return EasyMock.expect(iEnumIntfMock.getNumberOfRows() ).andReturn(5);

    + Matthew McCulloughMatthew McCullough, 2 years ago

    custom

    2226 views, 2 favs, 0 embeds more stats

    A quick review of the EasyMock mocking (testing) fr more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2226
      • 2226 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 35
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories