This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class DataloadSwitchController { | |
@AuraEnabled | |
public static String toogleValidationRule(String validationRuleId, Boolean state){ | |
System.debug('Toggle apex method called'); | |
System.debug('validationRuleId: '+ validationRuleId); | |
System.debug('state: ' + state); | |
HttpResponse resp = new HttpResponse(); | |
resp.setStatusCode(204); | |
resp.setBody('empty body'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LightningElement, api, track } from 'lwc'; | |
/****************** | |
* APEX METHODS | |
******************/ | |
import toogleValidationRule from '@salesforce/apex/DataloadSwitchController.toogleValidationRule'; | |
export default class ToogleValidationRule extends LightningElement { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function s() { | |
return function () { | |
$A.componentService.addModule( | |
"markup://c:lwcAgGrid", | |
"c/lwcAgGrid", | |
[ | |
"lwc", | |
"lightning/platformResourceLoader", | |
"@salesforce/resourceUrl/agGridMin" | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cpx from 'cpx'; | |
import { log } from 'console'; | |
// Copy the SLDS resources to the assets dir | |
cpx.copy('../../node_modules/@salesforce-ux/design-system/assets/**/*', 'src/assets', () => { | |
log(`Done copying SLDS resources`); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class MyCalculator { | |
// Static methods are used to perform instant calculations, | |
// method starts, runs, and returns something, but nothing is stored in memory! | |
public static Integer sum (Integer a, Integer b) { | |
return a + b; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@isTest | |
public with sharing class RecipeTriggerTest { | |
@isTest static void fieldsAreRequired() { | |
Recipe__c recipe = new Recipe__c(); | |
String exceptionMessage; | |
try { | |
Test.startTest(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@isTest | |
private with sharing class SampleBadMethodsTest { | |
@isTest | |
private static void iAddUpPositiveIntegers_positive() { // Happy path | |
// GIVEN | |
Integer a = 10; | |
Integer b = 20; | |
// WHEN | |
Test.startTest(); |