All These Things That I've Done

Apply the programming model to everyday programming problems...
posts - 78, comments - 71, trackbacks - 28

Assert

There are 1 entries for the tag Assert
Assert multipli all'interno di un singolo unit test

Roy Osherove fornisce in questo post, alcuni validi motivi del perchè secondo lui non dovrebbe essere possibile permettere di fallire più assert nell'esecuzione di un singolo unit test. Il post è in contrapposizione con un'altro post di James Avery dove viene spiegato invece, il perchè questa feature potrebbe essere utile.  Un piccolo assaggio che quoto in pieno: "Even if we assume that all the asserts are run, you're essentially running multiple tests on code that has "dirty" state. For example, asserting on the result of a method call may actually change the state of the object under test so that the next call to that method may...

posted @ mercoledì 4 ottobre 2006 9.48 | Feedback (1) | Filed Under [ Design Guidelines C# ]

Powered by: