Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 789 Bytes

File metadata and controls

18 lines (12 loc) · 789 Bytes

Testing Fakes

Build Status codecov

Easy generate fake implementation of getters and setters. Also, canned method returns can be programmed.

Usage

Faker creates proxy objects that from a Map<String,Object> to generate the output of their method calls. The Map gives the method name and the value to return. Also, a builder can be used to create the fake objects in a more human-readable way:

Bar bar = Faker.newBuilder(Bar.class)
				.with("foo", "my-value")
				.build();
assertEquals("my-value", bar.getFoo());