Information Technology
Hands on Training icon
Hands On Training
Hands on Training icon

Getting Started with EasyMock

Course Cover
compare button icon

$21

Visit Course

Visit Course

Offer Percent Icon

2 Coupons Available

Login To View All

Course Features

icon

Duration

1.52 hour

icon

Delivery Method

Online

icon

Available on

Downloadable Courses

icon

Accessibility

Mobile, Desktop, Laptop

icon

Language

English

icon

Subtitles

English

icon

Level

Intermediate

icon

Teaching Type

Self Paced

icon

Video Content

1.52 hour

Course Description

It is hard to write unit tests because of the dependencies between the application classes. You will learn how to use mocks to focus on what you are trying to test in this course, Getting Started With EasyMock. EasyMock gives you complete control over the behavior and dependencies of your unit-under test. You will first learn how mock objects can be used instead of real dependencies. Next, you'll learn how to configure mocked method, including return values, exception throwing, and exception handling. The final step is to learn how to create a partial mock, and how you can use it to test difficult situations. After completing this course, you will be able to use EasyMock mocking skills to create Java unit tests.

Course Overview

projects-img

Internship

projects-img

Job Assistance

projects-img

International Faculty

projects-img

Case Based Learning

projects-img

Post Course Interactions

projects-img

Case Studies,Instructor-Moderated Discussions

projects-img

Case Studies, Captstone Projects

Skills You Will Gain

Course Content

Module 1: Getting Started with EasyMock
1. Introduction
2. Writing a Test without Mocks
3. What Is Mocking and Why Use It?
4. Adding Mocks to the Test
5. Test Doubles
6. Advanced Mocking Concepts
7. Summary

Module 2: Configuring Behavior of Mocks
1. Introduction
2. Configuring Your First Mocked Methods
3. Using EasyMock Annotations
4. Chaining Multiple Mocks in a Single Test
5. Extending the AccountOpeningService
6. Argument Matchers
7. Configuring Exception Throwing on Mocks
8. Configuring Void Mocked Methods
9. Recap and Summary

Module 3: Verifying What Methods Are Called Using EasyMock
1. Introduction
2. Verifying Mocks
3. Relaxing Expected Method Call Counts
4. Verifying the Unexpected
5. Method Stubbing without Verification
6. Verifying the Order of Method Calls
7. Summary

Module 4: Advanced Topics
1. Introduction
2. Testing Code That Deals with Time: Understanding the Challenge
3. Testing Code That Deals with Time: Solving the Puzzle
4. Using the EasyMockSupport Class
5. Partial Mocks
6. Final Methods and Summary

Course Instructors

Author Image

Nicolae Caprarescu

Instructor

Now an independent consultant, Nicolae started his career in 2013 as a software engineer. Over the years, Nicolae worked on systems ranging from high-frequency Java trading engines to various apps fo...
Course Cover

$21

Visit Course

Visit Course

Offer Percent Icon

2 Coupons Available
Get upto 50% Discount