Skip to content

Mock different SObjects with the same mockId #232

Description

@pgajek2

Describe the bug
Use the same mockId for different queries. It stll should work.

To Reproduce
Apex script to reproduce the behavior:

SOQL.of('Account').mockId('MyMockId').toList();
SOQL.of('Contact').mockId('MyMockId').toList();

SOQL.mock('MyMockId')
   .thenReturn(new Account(...))
   .thenReturn(new Contact(...));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexGood for senior developers.enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions