I guess extension methods in C# 3.0 will be hard to mock out ...
The concern with static classes comes from a technical limitation ... I think it would be best to somehow find a way to mock static classes instead of making almost everything a singleton which does not make sense conceptually. Sébastien On 7/17/06, Brad Wilson <[EMAIL PROTECTED]> wrote:
Tests should always occur in as much isolation as is reasonable. Class A requires the services of some class that implements interface B. I can write a "mock B", implementing this interface, which returns dummy data (or stores passed information), as necessary in support of the test. If Class A has a hard dependency on class B, then I can't mock it out. Now I'm not just testing A, I'm also testing B. Static classes yield hard dependencies. Hard dependencies don't test well. On 7/17/06, Shawn Wildermuth <[EMAIL PROTECTED]> wrote: > > Can you explain "mock out"? > =================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
-- Sébastien Lorion Architecte organique Software Architect Nurun inc. +1 (418) 627-2001 [EMAIL PROTECTED]
