|
From: Steve F. <st...@m3...> - 2003-02-08 22:39:52
|
How about ExtractActualValue() ?
S.
Joe Walnes wrote:
> Ok, I get it. Looks good. Can we think of a less confusing name than
> TestValue?
>
> -j
>
> Steve Freeman wrote:
>
>> Joe Walnes wrote:
>>
>>> st...@m3... wrote:
>>> I'm not getting the TestValue option. Could you provide an example...
>>
>>
>>
>>
>> public void Verify(IConstraint constraint, Object actual)
>> {
>> Assert("Constraint, expected: " + constraint.Message
>> + " actual: " + constraint.TestValue(actual),
>> constraint.Eval(actual));
>> }
>>
>> public class Equals implements IConstraint {
>> public bool Eval(object actual) {
>> return expected.Equals(TestValue(actual));
>> }
>> public virutal object TestValue(object actual) {
>> // default implementation
>> return actual;
>> }
>> // ...
>> }
|