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

easyRandom.objects always returning the same record list #26

Closed
carborgar opened this issue May 15, 2023 · 0 comments · Fixed by #27
Closed

easyRandom.objects always returning the same record list #26

carborgar opened this issue May 15, 2023 · 0 comments · Fixed by #27

Comments

@carborgar
Copy link
Collaborator

Hi,

Just found a bug regarding records. When you randomize a list of records, it's always returning the same value, so all the objects inside the stream are the same (see attached test). I opened the issue just in case someone is facing the same and can provide a workaround or guidelines to fix it.

This is the test I made:

    @Test
    void typeRecordListShouldBePopulatedWithDifferentValues() {
        List<TestRecord> recordList = easyRandom.objects(TestRecord.class, 2).toList();

        TestRecord rnd1 = recordList.get(0);
        TestRecord rnd2 = recordList.get(1);

        assertThat(rnd1).isNotEqualTo(rnd2);

    }

Found it using version 6.1.7

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

Successfully merging a pull request may close this issue.

1 participant