You need to sign in to do that
Don't have an account?
Guru 91
How to get test coverage for this class?
Hi ,
How to get test coverage for this class.
global abstract class PageControllerBase {
public Boolean showHeader {get; set;}
public PageControllerBase() {
showHeader = true;
String headerParameter = ApexPages.currentPage().getParameters().get('showHeader');
if ('false' == headerParameter || 'no' == headerParameter) {
showHeader = false;
}
String userAgent = ApexPages.currentPage().getHeaders().get('USER-AGENT');
if (null != userAgent && (userAgent.contains('iPhone') || userAgent.contains('iPad'))) {
showHeader = false;
}
}
}
Thanks
How to get test coverage for this class.
global abstract class PageControllerBase {
public Boolean showHeader {get; set;}
public PageControllerBase() {
showHeader = true;
String headerParameter = ApexPages.currentPage().getParameters().get('showHeader');
if ('false' == headerParameter || 'no' == headerParameter) {
showHeader = false;
}
String userAgent = ApexPages.currentPage().getHeaders().get('USER-AGENT');
if (null != userAgent && (userAgent.contains('iPhone') || userAgent.contains('iPad'))) {
showHeader = false;
}
}
}
Thanks
Please write the test class for the extended class not for abstract class. It cant be initiated.