What is Mockito, and how do you create a mock using the Mockito mocking framework?
- [Voiceover] While the development of stand in…or mocked objects in Java can be accomplished manually,…there's no need to do so, unless it's a work to create…the mocked object is simple and straight forward.…Most Java and Android developers rely on a mock object…framework, or mocking framework, to generate the mock…object's need for testing.…Mockito is a popular open-source mocking framework…for Java that has been around since 2008.…It's creater, Szczepan Faber, started working…with Easy Mock, but wanted to create a framework…that was easier to use.…
Find the documentation of Mockito at mockito.org.…I've opened Android Studio and opened project 05_02_Start.…In order to use Mockito in local test,…it needs to be added to the dependencies list…in your projects build gradle file.…As of this recording, the lastest version of Mockito is 1.9,…although a beta 2.0 version, under the name…Mockito versus Mockito core, is also available.…Continue to monitor the Mockito website for updates…and availability to this new version of the framework.…
AuthorJames P White
- Why unit test?
- Unit testing tools
- Local testing with JUnit
- Working with JUnit assertions, rules, and categories
- Executing instrumented tests
- Filtering tests
- Testing with UI Automator and other testing tools
Skill Level Intermediate
Foundations of UX: Usability Testingwith Chris Nodder1h 29m Beginner
1. Getting Started
2. Local Tests
3. Instrumented Tests
4. Other Android SDK Testing Tools
5. Mocking objects
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.