Skip to content

Commit

Permalink
test(example): add examples
Browse files Browse the repository at this point in the history
Closes #2
  • Loading branch information
ArturMoczulski committed May 20, 2019
1 parent 79f9b3b commit 16218e3
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
7 changes: 7 additions & 0 deletions force-app/main/default/classes/RollbarTestController.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public with sharing class RollbarTestController {
public PageReference test() {
List<Account> aa = [SELECT Id, Name FROM Account WHERE Name = 'Acme'];
Account ac = aa[2];
return null;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="urn:metadata.tooling.soap.sforce.com" fqn="RollbarTestController">
<apiVersion>45.0</apiVersion>
<status>Active</status>
</ApexClass>
7 changes: 7 additions & 0 deletions force-app/main/default/pages/RollbarTest.page
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<apex:page controller="RollbarTestController">
<h1>Rollbar Test</h1>
<p>Press the button below to cause an exception.</p>
<apex:form>
<apex:commandButton action="{!test}" value="Throw exception" />
</apex:form>
</apex:page>
5 changes: 5 additions & 0 deletions force-app/main/default/pages/RollbarTest.page-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="urn:metadata.tooling.soap.sforce.com" fqn="RollbarTest">
<apiVersion>45.0</apiVersion>
<label>RollbarTest</label>
</ApexPage>
4 changes: 4 additions & 0 deletions force-app/main/default/triggers/LeadTrigger.trigger
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
trigger LeadTrigger on Lead (before insert) {
String str;
str.toLowerCase();
}
5 changes: 5 additions & 0 deletions force-app/main/default/triggers/LeadTrigger.trigger-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata" fqn="LeadTrigger">
<apiVersion>45.0</apiVersion>
<status>Active</status>
</ApexTrigger>

0 comments on commit 16218e3

Please sign in to comment.