be a legacy code unit test ninja with typemock isolator
DESCRIPTION
Roy Osherove teaches how to use Typemock Isolator to write unit tests for legacy code that cannot be changed.23-11-2010TRANSCRIPT
![Page 1: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/1.jpg)
1
Roy Osherove CTO, Typemock
Unit Testing Legacy CodeWith Isolator
@RoyOsherove
![Page 2: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/2.jpg)
2
Twitter : Ask @Typemock under #Legacy
Asking Questions
![Page 3: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/3.jpg)
3
Answer Survey
Giveaways:2 Isolator Licenses
![Page 4: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/4.jpg)
Our ApplicationBlogEngine.NET
Download the code Follow Along
http://blogengine.codeplex.com/
![Page 5: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/5.jpg)
What shall we test?
Blog Post Manager Ping\Trackback.Send(..)Ping\Trackback
Servers
![Page 6: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/6.jpg)
Legacy Code Ahead Lots of Dependencies Unknown Beforehand Many Rules Don’t Apply Tests are longer, and
harder to read Better to start with
integration tests
7
![Page 7: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/7.jpg)
Demo Excavating Code with Isolator
Wishful Invocation Get dependency
exception Choose Dependency from stack
FAKE dependency
![Page 8: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/8.jpg)
Summary
Approach Legacy With Caution Choose the right level of isolation Use Broad Strokes when Faking Legacy
MaintainabilityReadability
See tests fail and passtrust
9
![Page 9: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/9.jpg)
More Advice
Typemock Forumshttp://forums.typemock.com/
Support staff Blog.typemock.com
10
![Page 10: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/10.jpg)
Vs. Competitors
VS Versions• Supports vs
2005-2010• Supports .NET
2.0 – 4.0
Fakes• Any Legacy
Code• IntelliTest
Suggestions
3rd party• Works with
other profilers• Extensible
IntelliTest• Extensible
CThru
![Page 11: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/11.jpg)
12
Easy, Correct & Effective Unit Testing
“Typemock - My testing tool of choice. Each time I use it, I rediscover its power, and I'm amazed.
Great tool!”Jason C Divis, @CodingOfficer
![Page 12: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/12.jpg)
13
Twitter : Ask @Typemock
Asking Questions
![Page 13: Be a legacy code Unit Test Ninja with Typemock Isolator](https://reader036.vdocuments.mx/reader036/viewer/2022062616/54b520914a7959cd118b45e8/html5/thumbnails/13.jpg)
14
Answer All Survey Questionsafter this webinar finished
Giveaways:2 Isolator Licenses