You need to sign in to do that
Don't have an account?
Michele Toscano
Increase Code Coverage - WrapperSoap
I'm at 50% code coverage of my test class. How can I increase the coverage?
Here is my apex class: (The lines bolded below are not covered...how can I cover them?)
Global class IncidentManagerCallout{
public static IncidentManager.ArrayOfSHSHresult GetIMData(string email){
IncidentManager.IncidentManagerWrapperSoap soapService = new
IncidentManager.IncidentManagerWrapperSoap ();
return soapService.IMSearch(email);
}
public static IncidentManager.ArrayOfSHSHresult GetIMTimeStampSearchData(string email){
IncidentManager.IncidentManagerWrapperSoap soapService = new
IncidentManager.IncidentManagerWrapperSoap ();
return soapService.IMTimeStampSearch(email);
}
}
And here is my test class:
@isTest(SeeAllData=true)
Global class TestIncidentManagerCallout{
static testMethod void Test(){
string email = GetUserInfo.GetCurrentUserEmail();
Test.setMock(WebServiceMock.class, new IncidentManagerMock());
IncidentManager.ArrayOfSHSHresult result = IncidentManagerCallout.GetIMData(email);
}
}
Here is my apex class: (The lines bolded below are not covered...how can I cover them?)
Global class IncidentManagerCallout{
public static IncidentManager.ArrayOfSHSHresult GetIMData(string email){
IncidentManager.IncidentManagerWrapperSoap soapService = new
IncidentManager.IncidentManagerWrapperSoap ();
return soapService.IMSearch(email);
}
public static IncidentManager.ArrayOfSHSHresult GetIMTimeStampSearchData(string email){
IncidentManager.IncidentManagerWrapperSoap soapService = new
IncidentManager.IncidentManagerWrapperSoap ();
return soapService.IMTimeStampSearch(email);
}
}
And here is my test class:
@isTest(SeeAllData=true)
Global class TestIncidentManagerCallout{
static testMethod void Test(){
string email = GetUserInfo.GetCurrentUserEmail();
Test.setMock(WebServiceMock.class, new IncidentManagerMock());
IncidentManager.ArrayOfSHSHresult result = IncidentManagerCallout.GetIMData(email);
}
}
@isTest(SeeAllData=true)
Global class TestIncidentManagerCallout{
static testMethod void Test(){
string email = GetUserInfo.GetCurrentUserEmail();
Test.setMock(WebServiceMock.class, new IncidentManagerMock());
IncidentManager.ArrayOfSHSHresult result = IncidentManagerCallout.GetIMData(email);
IncidentManager.ArrayOfSHSHresult DateTimeresult = IncidentManagerCallout.GetIMTimeStampSearchData(email);
}
}