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

Bump org.instancio:instancio-junit from 4.3.2 to 4.4.0 #3147

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 11, 2024

Bumps org.instancio:instancio-junit from 4.3.2 to 4.4.0.

Release notes

Sourced from org.instancio:instancio-junit's releases.

4.4.0

What's Changed

Potentially breaking change

Allow selectors to overwrite initialised values even if Keys.OVERWRITE_EXISTING_VALUES is set to false

Previously, selectors could not overwrite initialised values if OVERWRITE_EXISTING_VALUES was set to false. This behaviour made the setting too restrictive. Starting from this release, selectors can overwrite initialised values.

For details, see: https://www.instancio.org/user-guide/#initialised-fields

New Features

New top-level API: setModel(TargetSelector, Model)

The new API promotes reuse of models. It allows applying a model instance to specific targets via a selector.

Example:

record Foo(String value) {}
record Container(Foo fooA, Foo fooB) {}
Model<Foo> fooModel = Instancio.of(Foo.class)
.set(field(Foo::value), "foo")
.toModel();

The model can be applied to a specific Foo field declared by the Container:

Container container = Instancio.of(Container.class)
    .setModel(field(Container::fooA), fooModel)
    .create();
// Sample output:
// Container[fooA=Foo[value="foo"], fooB=Foo[value="ANBQNR"]]

Coordinate generator for latitude and longitude

Location location = Instancio.of(Location.class)
    .generate(field(Location::lat), gen -> gen.spatial().coordinate().lat())
    .generate(field(Location::lon), gen -> gen.spatial().coordinate().lon())
    .create();
// Sample output: Location[lat=-77.80297026108207, lon=-122.08201176512672]

... (truncated)

Commits
  • f74c78f [maven-release-plugin] prepare release instancio-parent-4.4.0
  • dbc361c Updated user guide
  • 600816e Fix PMD violations
  • 0c2c780 Updated selector map toString()
  • 9222a2d New top-level API: setModel(TargetSelector, Model)
  • 58a6677 First pass at spatial generator without any customization options
  • 0f3ef51 Bump version.kotlin from 1.9.22 to 1.9.23
  • ab19981 instancio-junit: set log level to error when reporting seed value (#947)
  • 3cabe24 Updated Building page
  • 91f9ad7 instancio-junit: updated javadocs
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Mar 11, 2024
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.70%. Comparing base (8561ae6) to head (f203510).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3147   +/-   ##
==========================================
  Coverage      58.70%   58.70%           
  Complexity      3953     3953           
==========================================
  Files            573      573           
  Lines          19164    19164           
  Branches        1013     1013           
==========================================
+ Hits           11250    11251    +1     
+ Misses          7425     7423    -2     
- Partials         489      490    +1     

see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8561ae6...f203510. Read the comment docs.

@dependabot dependabot bot force-pushed the dependabot/gradle/org.instancio-instancio-junit-4.4.0 branch from f7188f9 to cbd186d Compare March 13, 2024 23:48
Bumps [org.instancio:instancio-junit](https://github.com/instancio/instancio) from 4.3.2 to 4.4.0.
- [Release notes](https://github.com/instancio/instancio/releases)
- [Commits](instancio/instancio@instancio-parent-4.3.2...instancio-parent-4.4.0)

---
updated-dependencies:
- dependency-name: org.instancio:instancio-junit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/gradle/org.instancio-instancio-junit-4.4.0 branch from cbd186d to f203510 Compare March 13, 2024 23:51
@Sheikah45 Sheikah45 merged commit aa99ad6 into develop Mar 22, 2024
5 checks passed
@Sheikah45 Sheikah45 deleted the dependabot/gradle/org.instancio-instancio-junit-4.4.0 branch March 22, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant