Send the link below via email or IMCopy
Present to your audienceStart remote presentation
- Invited audience members will follow you as you navigate and present
- People invited to a presentation do not need a Prezi account
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can follow your presentation
- Learn more about this feature in our knowledge base article
Strategy Pattern and Unit Testing
Transcript of Strategy Pattern and Unit Testing
The Strategy Pattern
Why design patterns?
Jamie's Prezi - http://prezi.com/pw0gdcff-nza/strategy/
The philosophy of the Strategy pattern is to have multiple strategies for doing some operation and let the user choose (or some algorithm based on input data) the appropriate strategy to carry out the operation.
1. They help solve complex problems
2. They are easier to maintain because they
have become a standard way to do things
3. They usually provide a great way to create
a series of tests that document your code,
stabilize your code, and let you deploy more
Software Design Patterns > unit testing > better code
GoF defines the Strategy pattern as "Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it."
Code Project - http://www.codeproject.com/Articles/346873/Understanding-and-Implementing-the-Strategy-Patter
The Art of Unit Testing - https://www.dropbox.com/s/cjpwz965yptok4j/The%20Art%20of%20Unit%20Testing%20with%20Examples%20in%20.NET.pdf
Unit Test - Definition
A unit test is a piece of a code (usually a method) that invokes another piece of code and checks the correctness of some assumptions afterward. If the assumptions turn out to be wrong, the unit test has failed.
A “unit” is a method or function.
Twitter - https://twitter.com/darylhemeon @darylhemeon
We want to do this as a group to
have greater reliability so we can
eventually deploy more often and provide better value more often to our