Skip to content

Commit

Permalink
teste
Browse files Browse the repository at this point in the history
  • Loading branch information
fschiozerSFDC committed May 22, 2024
1 parent 7526ada commit c9b3050
Show file tree
Hide file tree
Showing 9 changed files with 1,126 additions and 262 deletions.
12 changes: 12 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";


export default [
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReactConfig,
];
2 changes: 1 addition & 1 deletion force-app/main/default/classes/DummyClass.cls
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public with sharing class DummyClass {
}

public static String getStatic(){
String a = 'Analiza o código';;
String a = 'Analiza o código';

return a;
}
Expand Down
37 changes: 37 additions & 0 deletions force-app/main/default/classes/DummyClassTest.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* This class contains unit tests for validating the behavior of Apex classes
* and triggers.
*
* Unit tests are class methods that verify whether a particular piece
* of code is working properly. Unit test methods take no arguments,
* commit no data to the database, and are flagged with the testMethod
* keyword in the method definition.
*
* All test methods in an org are executed whenever Apex code is deployed
* to a production org to confirm correctness, ensure code
* coverage, and prevent regressions. All Apex classes are
* required to have at least 75% code coverage in order to be deployed
* to a production org. In addition, all triggers must have some code coverage.
*
* The @isTest class annotation indicates this class only contains test
* methods. Classes defined with the @isTest annotation do not count against
* the org size limit for all Apex scripts.
*
* See the Apex Language Reference for more information about Testing and Code Coverage.
*/
@isTest
private class DummyClassTest {

@isTest
static void myUnitTest() {
// TO DO: implement unit test

DummyClass dc = new DummyClass();

String a = dc.getStatic();

System.Assert(a == 'Analiza o código', 'Test failed !!!');


}
}
5 changes: 5 additions & 0 deletions force-app/main/default/classes/DummyClassTest.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>59.0</apiVersion>
<status>Active</status>
</ApexClass>
4 changes: 4 additions & 0 deletions log.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
7526ada,Fabio de Agostini Schiozer,2 hours ago,Update codeAnalyzerOnPR.yml
d969a34,Fabio de Agostini Schiozer,3 hours ago,Update codeAnalyzerOnPR.yml
849a41b,Fabio de Agostini Schiozer,3 hours ago,Update DummyClass.cls
0733066,Fabio de Agostini Schiozer,3 hours ago,Create codeAnalyzerOnPR.yml
9 changes: 2 additions & 7 deletions manifest/buildfile.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
{
"builds": [

{
"type": "metadata",
"manifestFile": "manifest/package.xml",
"testLevel": "RunLocalTests",
"testLevel": "RunSpecifiedTests",
"classPath": "force-app/main/default",
"timeout": "33",
"ignoreWarnings": true
},


{
"type": "anonymousApex",
"apexScript": "scripts/apex/hello.apex"
},


{
"type": "command",
"command": "sf --version"
}
]
}
}
1 change: 1 addition & 0 deletions manifest/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>DummyClass</members>
<members>DummyClassTest</members>
<name>ApexClass</name>
</types>
<types>
Expand Down
Loading

0 comments on commit c9b3050

Please sign in to comment.