Skip to content

Commit 880a561

Browse files
committed
mock not specify test
1 parent ac2c8d5 commit 880a561

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

force-app/main/default/classes/main/standard-soql/SOQL_Test.cls

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3438,6 +3438,15 @@ private class SOQL_Test {
34383438
Assert.areEqual(accounts, result, 'The mocked accounts should be returned.');
34393439
}
34403440

3441+
@IsTest
3442+
static void mockIdSpecifiedButQueryNotMocked() {
3443+
// Test
3444+
List<Account> accounts = SOQL.of(Account.SObjectType).with(Account.Name).mockId('mockingQuery').toList();
3445+
3446+
// Verify
3447+
Assert.areEqual(0, accounts.size(), 'The mocked accounts should be returned.');
3448+
}
3449+
34413450
@IsTest
34423451
static void mockingSingleRecord() {
34433452
// Setup

0 commit comments

Comments
 (0)