From: Nat P. <np...@us...> - 2002-08-09 18:13:05
|
Update of /cvsroot/mockobjects/no-stone-unturned/doc/xdocs In directory usw-pr-cvs1:/tmp/cvs-serv7678/doc/xdocs Modified Files: random.xml Log Message: Minor changes to wording Index: random.xml =================================================================== RCS file: /cvsroot/mockobjects/no-stone-unturned/doc/xdocs/random.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- random.xml 8 Aug 2002 15:03:17 -0000 1.3 +++ random.xml 9 Aug 2002 18:13:01 -0000 1.4 @@ -274,7 +274,7 @@ <methodname>testRandomTemperatureRaining</methodname> test failed. Not only that, my <methodname>testRandomTemperatureSunny</methodname> test failed as well! Why did that happen? The behaviour I added to the -<methodname>randomize</methodname> method should not have had an affect +<methodname>randomize</methodname> method should not have had an effect when it was not raining. </para> @@ -286,7 +286,10 @@ <para>Actually, looking at it again, I realise that I swapped the order of that statements that randomized the rain and temperature. The tests now initialise the stream of mock random numbers in the wrong -order. This is not good: tests should not be tied to the internal +order. This should not matter: the numbers are random so the order +in which they are read from the stream doesn't matter. But my tests +specify that it does matter. +This is not good: tests should not be tied to the internal implementation details of the class. They should specify only its externally visible behaviour. How can I make my tests less brittle? </para> |