Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.

add support for "beans" with no default constructor #9

Open
SierraGolf opened this issue Sep 2, 2012 · 0 comments
Open

add support for "beans" with no default constructor #9

SierraGolf opened this issue Sep 2, 2012 · 0 comments
Milestone

Comments

@SierraGolf
Copy link
Member

actually according to the java beans convention a default constructor must always be supplied, but in order to use the Beast also for "bean-like classes" or say "pojos" it may be nice to have support to test these classes also.

basically there are two kinds of classes without a default constructor:

  • immutable classes, of which the state can not be changed after creation
    • the test could mutate the constructor instead of using setters in order to get specific properties or in this case parameters "dirty" and see if it affects the implementations of equals, hashCode and toString
  • mutable classes, of which the state can be changed after creation
    • these classes are actually pretty hard to test because one would need to combine the constructor mutation and the setter mutation strategy
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant