I am new to writing test classes. Here is the method I have written my test class on
Class:
public with sharing class caseManage{
public static string IdSplit(Id i){
string s = i+'';
return s.substring(0,s.length()-3);
}
}
Test Class:
public static testmethod void unitTest1() {
caseTriggerPostHandler postObj = new caseTriggerPostHandler();
testDataUtil testHandler = new testDataUtil();
Id i;
Contact con = testHandler.createContact();
i = con.id;
postObj.IdSplit(i);
system.assertEquals(15, 'i');
}
As I said, I am pretty much new to development (admin backrground) so I am sure there are bunch of errors in my test class. Please suggest me corrections to my test class.