fakeiteasy - the simple way to get fakes done
DESCRIPTION
This talk is about FakeItEasy - the modern isolation framework with simple API. Details can be found in my post http://sstude.com/blog/2013/02/18/the-simple-way-to-get-fakes-done/TRANSCRIPT
![Page 1: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/1.jpg)
FakeItEasy The simple way to get
fakes done
Akim Khalilov
![Page 2: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/2.jpg)
2
Agenda
• Why do we need fake objects
• Fake objects – what are they?
• What is FakeItEasy?
• Examples
• More examples
![Page 3: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/3.jpg)
3
Why should we use fake objects?
Do not use real bullets. Do not hurt
anyone.
![Page 4: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/4.jpg)
4
Family of fakes
All depends on usage
![Page 5: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/5.jpg)
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
![Page 6: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/6.jpg)
6
Select one of many:
But not only…
It’s a matter
of taste
![Page 7: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/7.jpg)
7
FakeItEasy
![Page 8: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/8.jpg)
8
Patrik Hägne github.com/patrik-hagne
twitter.com/patrik_hagne
https://
github.com/fakeiteasy
Created by this man
Sweden
![Page 9: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/9.jpg)
9
Start with simple `A`
![Page 10: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/10.jpg)
10
Asserting
![Page 11: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/11.jpg)
11
Argument Constraints
![Page 12: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/12.jpg)
12
A Call To Method
![Page 13: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/13.jpg)
13
A Call To Fake
![Page 14: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/14.jpg)
14
Assert the order
![Page 15: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/15.jpg)
15
Anything else?
• https://github.com/fakeiteasy
• http://pluralsight.com/training/Courses/Table
OfContents/fakeiteasy
• http://ondevelopment.blogspot.com/
![Page 16: FakeItEasy - The simple way to get fakes done](https://reader033.vdocuments.mx/reader033/viewer/2022052523/5562a834d8b42a7c4a8b4ed0/html5/thumbnails/16.jpg)
16
Thank you!
@sstude
http://sstude.com