Is it generally accepted that you cannot test a code if this code is not verified?
Hypothetical code bit:
public void QueueOrder(SalesOrder order)
{
if (order.Date < DateTime.Now-20)
throw new Exception("Order is too old to be processed");
...
}
Some of them will think about reorganizing it:
protected DateTime MinOrderAge;
{
return DateTime.Now-20;
}
public void QueueOrder(SalesOrder order)
{
if (order.Date < MinOrderAge)
throw new Exception("Order is too old to be processed");
...
}
Note: You may find even more complex solutions; with interface IClockand factory. This does not affect my question.
The problem with changing the above code is that the code has changed. The code has changed without the client asking him to change. And any change requires meetings and conferences. And therefore, I am at a point where it is easier not to test anything.
If I don’t want / cannot make changes: does it make me unable to perform testing?
: #, . - .
. , , . , .
: . , , .
: , . : , .
: , , , , . , , .
, , DLL, .