From 129c92c682db48e9f740ec719527a4d4d1dd07c9 Mon Sep 17 00:00:00 2001 From: David Schach Date: Wed, 25 Oct 2023 16:58:54 -0700 Subject: [PATCH] update expected markup --- test/markup/apex/apexcode.expected.txt | 59 +++++++++++++------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/test/markup/apex/apexcode.expected.txt b/test/markup/apex/apexcode.expected.txt index 831f39a..b563d63 100644 --- a/test/markup/apex/apexcode.expected.txt +++ b/test/markup/apex/apexcode.expected.txt @@ -1,50 +1,51 @@ /** * @author John Smith */ -@IsTest(Seealldata=true) -public with sharing class L2Char implements Database.batchable { - public static final String ERROR = 0x0001; +@IsTest(Seealldata=true) +public with sharing class L2Char implements Database.batchable {{ + public static final String ERROR = 0x0001; - @InvocableApex(label='my invocable') - public void moveTo( - integer x, - integer y, - integer z - ) { + @InvocableMethod(label='my invocable') + public static void moveTo( + Integer x, + Integer y, + Integer z + ) { - Account a = new Account(); - a.Custom__c = 'stringvalue'; - insert a; - Boolean ai = (Boolean) false; - System.debug('Should not be called'); - if (1 > 5) { // wtf!? - Database.insert(myAccounts); + Account a = new Account(); + a.Custom__c = 'stringvalue'; + insert a; + Boolean ai = (Boolean) false; + System.debug('Should not be called'); + if (1 > 5 && !Test.isRunningTest()) { // wtf!? + Database.insert(myAccounts, false); } } } -@TestSetup -private static void makeData(Boolean a){ - Custom__c c = new Custom__c(); +@TestSetup +private static void makeData(Boolean a){ + Custom__c c = new Custom__c(); - for(Account a : acctLis ){ - ConnectApi.insert a; + for(Account a : acctLis ){ + ConnectApi.insert a; } } -private testMethod void testme(){ - System.assert(true); +@isTest +private static void testme(){ + System.assert(true); } -@testVisible -private List<SelectOption> recordTypes { get; private set; } +@testVisible +private List<SelectOption> recordTypes { get; private set; } -for(Account a : [SELECT Id FROM Account WHERE LastModifiedDate = LAST_N_DAYS:3]){ - Assert.fail(); +for(Account a : [SELECT Id FROM Account WHERE LastModifiedDate = LAST_N_DAYS:3]){ + Assert.fail(); } trigger CTrig on Custom__c (before insert){ - System.debug('inserting a record'); - upsert myRecord__c; + System.debug('inserting a record'); + upsert myRecord__c; } \ No newline at end of file