fakeiteasy - the simple way to get fakes done
Post on 25-May-2015
1.136 Views
Preview:
DESCRIPTION
TRANSCRIPT
FakeItEasy The simple way to get
fakes done
Akim Khalilov
2
Agenda
• Why do we need fake objects
• Fake objects – what are they?
• What is FakeItEasy?
• Examples
• More examples
3
Why should we use fake objects?
Do not use real bullets. Do not hurt
anyone.
4
Family of fakes
All depends on usage
5
How can we build our fakes?
Hand Rolled Fake Objects
Hard to implement
Can take a lot of time
Hard to support
Existing frameworks
Easy to start
Easy to build things
Easy to write
Easy to maintain
6
Select one of many:
But not only…
It’s a matter
of taste
7
FakeItEasy
8
Patrik Hägne github.com/patrik-hagne
twitter.com/patrik_hagne
https://
github.com/fakeiteasy
Created by this man
Sweden
9
Start with simple `A`
10
Asserting
11
Argument Constraints
12
A Call To Method
13
A Call To Fake
14
Assert the order
15
Anything else?
• https://github.com/fakeiteasy
• http://pluralsight.com/training/Courses/Table
OfContents/fakeiteasy
• http://ondevelopment.blogspot.com/
16
Thank you!
@sstude
http://sstude.com
top related