Skip to content

Instantly share code, notes, and snippets.

@snugsfbay
Last active April 3, 2016 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snugsfbay/28176efcf2370c00abd7 to your computer and use it in GitHub Desktop.
Save snugsfbay/28176efcf2370c00abd7 to your computer and use it in GitHub Desktop.
/*
An entire class that has all the logic commented out
other than two lines that simply return a value of null.
The developer might have simply deleted or deactivated
the class if no longer needed.
Here, I abreviated the commented-out code with elipses, but
in my org, many lines of code existed in the block comment.
*/
public with sharing class CheckInvisible {
/*
public static void TestInvis1() {
... 75 lines of code
}
public static void TestInvis2() {
... 80 lines of code
}
*/
public static pagereference CheckInvis1() {
//CheckInvisible.TestInvis1();
return null;
}
public static pagereference CheckInvis2() {
//CheckInvisible.TestInvis2();
return null;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>36.0</apiVersion>
<status>Deleted</status>
</ApexClass>
@isTest
public class CheckInvisibleTest {
static testMethod void Test1() {
//CheckInventories.TestInvs1();
CheckInvisible.CheckInvis1();
}
static testMethod void Test2() {
//CheckInventories.TestInvs2();
CheckInvisible.CheckInvis2();
}
}
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>36.0</apiVersion>
<status>Deleted</status>
</ApexClass>
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>boatAnchor</fullName>
<description>test removing bad classes</description>
<packageType>UNMANAGED</packageType>
<types>
<members>CheckInvisible</members>
<members>CheckInvisibleTest</members>
<name>ApexClass</name>
</types>
<version>36.0</version>
</Package>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment