Skip to content

Commit

Permalink
feat: expect action to run
Browse files Browse the repository at this point in the history
  • Loading branch information
Szandor72 committed Nov 16, 2023
1 parent 56d9b6e commit 298570c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions force-app/main/default/classes/AccountService.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
public class AccountService {
public void createAccount() {
Account a; // PMD: Avoid unused local variables
insert a; // PMD: Avoid DML statements inside loops
}

public void updateAccount() {
for (Integer i = 0; i < 10; i++) {
Account a = new Account(Name = 'Test' + i);
insert a; // PMD: Avoid DML statements inside loops
}
}

public void deleteAccount() {
List<Account> accounts = [SELECT Id FROM Account]; // PMD: Avoid SOQL queries inside loops
for (Account a : accounts) {
delete a; // PMD: Avoid DML statements inside loops
}
}
}
5 changes: 5 additions & 0 deletions force-app/main/default/classes/AccountService.cls-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>58.0</apiVersion>
<status>Active</status>
</ApexClass>

0 comments on commit 298570c

Please sign in to comment.