fest-assert currently cannot be used in environments like Android or GWT. You can find dedicated tickets at FEST-485
As proposed in FEST-485, splitting the current fest-assert-core to several modules could help using the library in Android. Modularization would also help separating concerns and keeping a core library focused on the most commonly used assertions while still enabling the use of special assertions by using specialized libraries.
One special library could be AWT specific, as this is a part of the JDK which isn't intensively used in modern web applications. Removing AWT specific code from the core library would minimize dependencies on quite specific parts of the JDK or other libraries. Android doesn't support that specific AWT part, so we could help e.g. Android developers by offering a core module without depending on AWT classes.
Other aspects of modularization aim at keeping the code DRY. Test factories currently being maintained in fest-assert-core/fest-assert-2.x should be moved to the already existing module fest-test, so that all fest modules could use commonly available test code.
With specialized fest-modules, one could also focus on special assertion classes for other libraries like Guava or Joda. You can find some thoughts about the advantages in the comments of FEST-485
, especially at Joel's comment
Joel already put some emphasis on keeping the API clear to make its usage as easy as possible for users. From my point of view a big help for the user would be a good naming pattern. The user doesn't want to search for the right module, so they want to find at least the core module as fast possible: I would suggest calling the public API "fest-assert". "fest-assert-core" is already too specific IMHO and would also be a candidate for some kind of internal API or a module containing abstract classes to ease the creation of specialized modules. Special modules could be called with a naming pattern like "fest-assert-awt", "fest-assert-gwt", "fest-assert-io", etc. Independently on the time when the actual modularization would be started, I suggest already calling the current 2.0 "main" module "fest-assert" instead of "fest-assert-core", just to be safe for the future.
You can already have a try with modularized fest-assertion libraries. All forked projects can be found on GitHub, most importantly the following ones:
The changes mainly address the compatibility issue with Android and they currently won't help with GWT. But I guess making fest-assert compatible with GWT would also force us to create specialized modules, because the core module should be kept clean from GWT dependencies.
What do you think about this proposal?