Skip to content

Mock different SObjects with the same mockId #232

@pgajek2

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(...));

Metadata

Metadata

Assignees

Labels

complexGood for senior developers.enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions