DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Mock Objects with Spock Screencast

Mock Objects with Spock Screencast

Hamlet D'Arcy user avatar by
Hamlet D'Arcy
·
Jul. 14, 11 · Java Zone · Interview
Like (0)
Save
Tweet
10.77K Views

Join the DZone community and get the full member experience.

Join For Free

This screencast demonstrates how to use Spock testing specifications and Groovy for mocking and stubbing behavior in unit tests. It covers creating the mock object syntax, setting expectations, verifying and spying on results, and argument matchers.

If you have any issues with video playback, then trying viewing it from the JBrains.tv website

Here are some useful links to read for this webcast:

  • Spock Framework - http://code.google.com/p/spock/
  • Spock Basics Screencast: http://tv.jetbrains.net/videocontent/ffff
  • Mocks and Stubs aren't Spies: http://hamletdarcy.blogspot.com/2007/10/mocks-and-stubs-arent-spies.html
  • Mocking with Spocks: http://www.canoo.com/blog/2010/04/20/spock-and-test-spies-a-logical-choice/

I've made a lot of screencasts and blog posts over the years. If you like this, then there are many ways to see the other stuff I've done:

  • My main blog: http://hamletdarcy.blogspot.com
  • My other JetBrains.tv posts: http://tv.jetbrains.net/tags/hamlet
  • IDEA related posts on my blog: http://hamletdarcy.blogspot.com/search/label/IDEA
  • My screencasts on YouTube: http://www.youtube.com/user/HamletDRC
  • IDEA related Posts on my work blog: http://www.canoo.com/blog/tag/idea/
  • Or follow me on Twitter: @HamletDRC

Phew, that's a lot of self-promotion :)

The screencast was created with Ubuntu 10.04, PiTiVi, Audicity, gtk-RecordMyDesktop, IntelliJ IDEA, and LibreOffice. OS from top to bottom.

Thanks for watching, and leave a comment!

From http://hamletdarcy.blogspot.com/2011/07/mock-objects-with-spock-screencast.html

Spock (testing framework) Object (computer science)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Testing Schema Registry: Spring Boot and Apache Kafka With JSON Schema
  • Unit Vs Integration Testing: What's the Difference?
  • How the TypeScript ReturnType Works
  • What Is HttpSession in Servlets?

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo