glazedlists / glazedlists

Open Source List Transformations for Java
Other
163 stars 32 forks source link

Add JUnit Support #39

Closed hbrands closed 20 years ago

hbrands commented 20 years ago

As Glazed Lists gets bigger in scope it is becoming very urgent to create a set of unit tests.

There should be a package such as .glazedlists.test that is only compiled if the JUnit libraries are
detected on the classpath. If they are, then these test files can be built. They can then be tested with a
"test" target in the project buildfile.

Finally these test classes shall not be included in the library distribution.

[GLAZEDLISTS-23] created by jessewilson

hbrands commented 20 years ago

I have added the framework for JUnit tests within the Glazed Lists package and build file.

Now all I have to do is write the tests!

by jessewilson

hbrands commented 20 years ago

I've gone through the code to select which classes are good candidates for unit tests. Unit tests require
programmatic access so testing Swing stuff will be of marginal value.

package: .glazedlists
AbstractFilterList
BasicEventList
CaseInsensitiveFilterList
SortedList
WritableMutationList

package: .glazedlists.listselectionmodel
SelectionModelEventList

package: .glazedlists.util
BoundedMap
CachingList
EventListIterator
FreezableList
IndexedTree
ReadOnlyList
SparseList

As of March 18, 2004 I have created tests for the CaseInsensitiveFilterList and the SortedList.

by jessewilson

hbrands commented 20 years ago

The most basic classes now have tests for them.

Some tests are not appropriate for JUnit, for example, concurrency tests.

Regardless, JUnit support is now in the Glazed Lists project. It is possible to add new tests by simply
creating a class that ends with Test.java. In fact, Glazed Lists now requires that classes ending in
Test.java must be JUnit tests as such classes are NOT included in the distribution jar.

Anyone interested in getting their hands dirty with Glazed Lists should consider adding more tests to
our test library!

by jessewilson

hbrands commented 20 years ago

This bug has been fixed for two weeks with no problems. I am marking it closed.

by jessewilson