naver / naver/fixture-monkey

a suggestion for `minSize` operator enhancement

Open
#598 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
699
Forks
124
Avg merge
24m
Merged PRs (30d)
7

Description

Describe the feature you request

When setting a collection with fixture monkey operator minSize, then I expect it to be NOT null.

For example, it would be nice to have tearchers which is always NOT null in the below circumstance. The rational behind this is that if the size of a collection is greater than 0, the collection should not be null.

fun school(fixture: FixtureMonkey): ArbitraryBuilder<School> = 
  fixture.giveMeBuilder(School::class.java)
    .minSize("teachers", 1)
data class School() {
  val teachers: List<Teacher>
}

If the feature request is approved, would you be willing to submit a PR?

Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Fixture Monkey minSize operator and trace how it applies constraints to collection properties. Use the School example with minSize("teachers", 1) to verify the resulting teachers collection is both non-null and has at least one element; done means this behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.