I'm trying to write a simple text class for another simple class that has an @InvocableMethod method, but receive the save error in the question's title. I can't figure out its cause or how to overcome it.
Class with @InvocableMethod Method:
global with sharing class InputOutput_Placeholder_Plugin {
@InvocableMethod
public static List<List<String>> placeholderText(List<String> input) {
String s = input.get(0);
List<String> allString = new List<String>();
List<List<String>> allStrings = new List<List<String>>();
allString.add(s);
allStrings.add(allString);
return allStrings;
}
}
Test Class:
@isTest
private class InputOutput_Placeholder_Plugin_Test {
static testmethod void InputOutput_Placeholder_Plugin_Tests() {
InputOutput_Placeholder_Plugin plugin = new InputOutput_Placeholder_Plugin();
String s = 'Searching';
List<String> stringList = new List<String>();
stringList.add(s);
plugin.placeholderText(stringList);
}
}
The error occurs at plugin.placeholderText(stringList);
Thanks in advance.