You need to sign in to do that
Don't have an account?

increase code coverage. now 37%
Hi,
I am writing a test class. I have covered 3 lines bt I am not getting how to cover remainig. Can anyoe suggest
Class:
global class ACN_ExceptionDebugProvider implements ACN_ExceptionProviderService {
global ACN_ExceptionLibrary.ExceptionResponse ProcessException (ACN_ExceptionLibrary.ExceptionRequest request) {
ACN_ExceptionLibrary.ExceptionResponse response = new ACN_ExceptionLibrary.ExceptionResponse();
response.Id = request.Id;
response.Name = request.Name;
response.DataProviderName = request.DataProviderName;
response.ExceptionMap = request.ExceptionMap;
response.ExtendedProperties = request.ExtendedProperties;
System.debug(request);
return response;
}
}
Test Class: Need coverage from 3rd line
@IsTest
private class ACN_ExceptionDebugProviderTest {
@testSetup
private static void testSetup() {
}
@isTest
private static void testProcessException() {
try {
Test.startTest();
new ACN_ExceptionDebugProvider().ProcessException(null);
Test.stopTest();
} catch(Exception e) {
}
}
}
I am writing a test class. I have covered 3 lines bt I am not getting how to cover remainig. Can anyoe suggest
Class:
global class ACN_ExceptionDebugProvider implements ACN_ExceptionProviderService {
global ACN_ExceptionLibrary.ExceptionResponse ProcessException (ACN_ExceptionLibrary.ExceptionRequest request) {
ACN_ExceptionLibrary.ExceptionResponse response = new ACN_ExceptionLibrary.ExceptionResponse();
response.Id = request.Id;
response.Name = request.Name;
response.DataProviderName = request.DataProviderName;
response.ExceptionMap = request.ExceptionMap;
response.ExtendedProperties = request.ExtendedProperties;
System.debug(request);
return response;
}
}
Test Class: Need coverage from 3rd line
@IsTest
private class ACN_ExceptionDebugProviderTest {
@testSetup
private static void testSetup() {
}
@isTest
private static void testProcessException() {
try {
Test.startTest();
new ACN_ExceptionDebugProvider().ProcessException(null);
Test.stopTest();
} catch(Exception e) {
}
}
}
try this code .. set the ExceptionRequest properties as show below