• Avinash Y
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 3
Error: Challenge Not yet complete... here's what's wrong: 
The 'Matrix of Leads' report is not a matrix report.

I created a matrix report and as per the instructions but its throwing an error saying that the report is not matrix report

User-added image
Create an Apex class that returns an array (or list) of strings: 
Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.The Apex class must be called 'StringArrayTest' and be in the public scope.
The Apex class must have a public static method called 'generateStringArray'.
The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.

MyApexClass to above Challenge:

public class StringArrayTest {
    public static List<string> generateStringArray(Integer n)
        List<String> myArray = new List<String>();
        for(Integer i=0;i<n;i++)
        return myArray;

It's compile and execute as per requirement in Developer console. But Traihead showing the below error:

Challenge not yet complete... here's what's wrong: 
Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings.

Anyhelp would be greatly appreciated. Thanks.



I know it seems like a dumb question but I'm trying to familiarize myself with testing apex code with apex language.  


I am unsure when to use system.assertequals(x,y), system.assert(condition) and system.assertnotequals(x,y) and I have noticed it being used quite a bit.  I've looked at the user guide and and this link http://wiki.developerforce.com/index.php/An_Introduction_to_Apex_Code_Test_Methods, but still require more of a plain english explanation on when and why these methods are used.


Can anyone help me on this.


Much thanks!