Spark Shen wrote:
> 2007/7/5, Alexei Zakharov <[EMAIL PROTECTED]>:
>>
>> Paulex Yang wrote:
>> > What I meant is the test cases may need to be written against API
>> factory
>> > method instead of construct implementation classes directly via
>> > implementation specific constructor/class, and the compatibility tests
>> like
>> > serialization tests are needed. I have no preference in where the
>> > implementation classes locate.  :)
>>
>> Look, in beans we have special (package-protected) entities that are
>> responsible for handling all persistence-related problems. If we like
>> to test these non-public entities we have two ways: write an
>> implementation test that can call protected methods directly to check
>> the desired behavior, or write an API test that will walk rather long
>> code path - create an appropriate content, instantiate XMLEncoder and
>> so on. In the last case our testing method is less accurate and
>> flexible comparing to the first one. Moreover, the real persistent
>> delegate issue can be hidden by bugs in complex logic of XMLEncoder.
> 
> 
> But, the problem is some internal tests will fail on RI. Then what's these
> test cases test against?

That's the definition of an implementation test -- it is
implementation-specific.  We would only expect the API tests to pass on
the RI, but API + implementation tests to pass against Harmony.  HTH.

Regards,
Tim

Reply via email to