db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2460) Create a framework for writing unit tests that will access a private fields of derby classes.
Date Mon, 26 Mar 2007 17:11:32 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484164
] 

Daniel John Debrunner commented on DERBY-2460:
----------------------------------------------

kw> [lots of good stuff]

Sounds good, I was only concerned about backlash to removing test code if the package-api
changed such that the test was a pain to re-write if the contributor thought functional tests
were sufficient. 

kw> If I'm the only one feeling the need for writing package-private class tests, I do
not mind writing them and not contributing them :) 

Even if you were the only interested party I would still recommend contributing them, it's
fine if only one person has that itch. Others can only start to have the itch if there is
something there, a community can never build around something that isn't there.

kw>  but feel they can serve as documentation on how I intended my class to be used. 

Hmmm, while sometimes tests can help folks figure out how to use something, ideally the class
itself should document how it is to be used. :-)

> Create a framework for writing unit tests that will access a private fields of derby
classes.
> ---------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2460
>                 URL: https://issues.apache.org/jira/browse/DERBY-2460
>             Project: Derby
>          Issue Type: New Feature
>    Affects Versions: 10.3.0.0
>            Reporter: Julius Stroffek
>            Priority: Minor
>         Attachments: derby-2460-writeup-rev01.txt
>
>
> Create a testing framework for writing unit tests that will not test the functionality
but some other properties of the code like DRDA protocol, conditions of B-trees, behavior
of locking, etc. These tests may be written in a same way like the function tests are but
they will not test the public API but some underlaying Derby functions. So, there is a need
for the tests to access some package private properties/methods.
> The discussion about this issue took place on derby-dev couple of months ago.
> Please, see
> http://www.nabble.com/Testing-implementation-of-private-classes-tf2919330.html#a8158779
> for more information.
> Currently, there is an implementation of such a test in org.apache.derby.impl.drda.TestProto.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message