Introducing
Your new presentation assistant.
Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.
Trending searches
Northeast Wisconsin
Code Camp
March 24th, 2018
https://www.ftc.gov/news-events/media-resources/truth-advertising/advertisement-endorsements
As per the FTC’s Guides Concerning the Use of Endorsements and Testimonials in Advertising:
Please be aware that I have received a Community license, at no cost to me, for Typemock Isolator, due to involvement in the development community and my writing/speaking on mocking topics.
Legal Disclaimer
wrightfully.com/mocktalk
My test
value
© Copyright 2018 John M. Wright
mock
test double
mock.VerifyAllExpectations();
mock.AssertWasCalled(x => x.MyMethod());
mock
vs
stub
vs
stub
A rose by any other name
would smell as sweet
work about the same
mock types
as of 2018-01-22
Code Examples (aka: What can you do?)
Code being tested
Example Test using a Mock
Using Moq Syntax
Unconstrained Code Examples
Typemock Syntax
Code being tested
MS Fakes Syntax
[assembly: InternalsVisibleTo("Your.TestAssembly")]
Generated Classes:
Hijacked Code:
The New Guy In Town
All that, plus:
Mock
What can
I expect?
dynamic
Unconstrained
Constrained
More Info @
wrightfully.com/mocktalk
substitute
http://mimiandeunice.com/2011/07/19/expectations/
shim
partial
Unconstrained
.VerifyAll()
Great for testing "legacy" code.
Best fit for code written with testing in mind.
fake
strict
Constrained