Skip to content

Instantly share code, notes, and snippets.

@britishboyindc
Last active November 21, 2016 18:18
Show Gist options
  • Select an option

  • Save britishboyindc/b86ce34b00cc212f8be97dee2a784c59 to your computer and use it in GitHub Desktop.

Select an option

Save britishboyindc/b86ce34b00cc212f8be97dee2a784c59 to your computer and use it in GitHub Desktop.
List<ApexClass> ac = [select Id, name, body from ApexClass where NamespacePrefix = NULL ];
integer i = 0;
for (ApexClass actemp: ac) {
if (actemp.body.contains( '@isTest') ) {
i++;
}
}
system.debug(i + ' classes are Tests');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment