Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set all fields for type not working correctly #98

Closed
martinjunker opened this issue Oct 19, 2023 · 3 comments
Closed

Set all fields for type not working correctly #98

martinjunker opened this issue Oct 19, 2023 · 3 comments

Comments

@martinjunker
Copy link
Contributor

Since version 2.9.5 (2.9.5 is first broken version) the feature Set all fields for type is not working correctly.

ISpecimenBuilder<Item> ITEM_BUILDER = Fixture.fixture().build(Item.class) .with(BigDecimal.class, BigDecimal.valueOf(10000));

In Item is a deep nested property with BigDecimals and these are not set to my defined value but to a random one.

@akutschera
Copy link
Collaborator

Nice catch.
The current implementation only checks for predefined instances of certain types. Special types (that need special constructor parameters, such as BigInteger) were not among them.
The commit above should fix that.

akutschera added a commit that referenced this issue Oct 23, 2023
akutschera added a commit that referenced this issue Oct 23, 2023
- Fix for #98: use predefined type for all fixtures
@Nylle
Copy link
Owner

Nylle commented Oct 23, 2023

Fixed in version 2.9.9.

@Nylle Nylle closed this as completed Oct 23, 2023
@martinjunker
Copy link
Contributor Author

Thx, for fixing it!

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

No branches or pull requests

3 participants