You need to sign in to do that
Don't have an account?
Post install script System.Test.testInstall method not available
Developed post install script -- no problem.
However, when I try to add a test script (see below), I get "Method does not exist or incorrect signature: System.Test.testInstall". The testInstall method does not show up in the list of methods available for the Test class in Eclipse IDE, and editing/saving the test class directly in the Salesforce UI results in the same error.
Please advise.
@isTest
static void testInstallScript() {
PostInstallClass postinstall = new PostInstallClass();
System.Test.testInstall(postinstall, null);
System.Test.testInstall(postinstall, new Version(1,0), true);
List<Account> a = [Select id, name from Account where name ='Newco'];
System.assertEquals(a.size(), 1, 'Account not found');
}