Skip to content

JimmyNIYONKURU/UnitTest-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Test doubles

The folder timezones contains a simple project that gets timezone information from the World Time API.

The class TimeZoneService depends on WorldTimeApiHttpClient that consults the API, we need to test TimeZoneService but WorldTimeApiHttpClient relies on the external API.

  1. Create an interface for WorldTimeApiHttpClient, name it just WorldTimeApiClient.
  2. Use the new interface to create a fake class.
  3. Use the fake class to create a unit test testing TimeZoneService.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages