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

add support for direct property mutation #10

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

add support for direct property mutation #10

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

Comments

@SierraGolf
Copy link
Member

background
currently the properties of the class under test are only mutated through their public setters. if there is none, no mutation is possible for these properties. the reason for choosing this strategy was that this is the best way to be able to mutate inherited properties which might be private to the super class, but have public setter which the class under test has inherited.

why do we need direct property mutation then?
sometimes a class can be mutated from outside without having a specific setter. this can be through a side-effect of another setter or another method.

implementation notes
the public setter strategy should be the default setting and the documentation should state that the user should only use the direct property mutation strategy if he does not care about inherited properties and wants to test explicitly that a property is contained or not contained in the implementations of equals, hashCode or toString which can not be directly mutated through a public setter.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant