You need to sign in to do that
Don't have an account?
Amy Thropp
Test Class for classes where it is only a data definition
Hi all,
We have a problem in production because, after removing some classes that weren't in use, but were well tested, our total coverage has dropped down below 75% and now we can't add any more stuff until we work out what we need to do.
Much of our Apex is contractor-developed code for our integration with our JD Edwards ERP system. Many of the classes installed already look like the one listed below, and are coming up with 0% code coverage. If I can work out how to hit these classes with test procedures, I'm sure I can get us back over 75% (we're at 72% now).
My question is: How do you test a class like the one listed below?
public class jdeContractPriceManagerBase {
public class ValueObject {
private String[] apex_schema_type_info = new String[]{'http://base.bssvfoundation.e1.oracle','false','false'};
private String[] field_order_type_info = new String[]{};
}
public class MessageValueObject {
public jdeContractPriceManagerUtil.E1MessageList e1MessageList;
private String[] e1MessageList_type_info = new String[]{'e1MessageList','http://util.bssvfoundation.e1.oracle','E1MessageList','1','1','true'};
private String[] apex_schema_type_info = new String[]{'http://base.bssvfoundation.e1.oracle','false','false'};
private String[] field_order_type_info = new String[]{'e1MessageList'};
}
}
Thanks for any help you can provide.
We have a problem in production because, after removing some classes that weren't in use, but were well tested, our total coverage has dropped down below 75% and now we can't add any more stuff until we work out what we need to do.
Much of our Apex is contractor-developed code for our integration with our JD Edwards ERP system. Many of the classes installed already look like the one listed below, and are coming up with 0% code coverage. If I can work out how to hit these classes with test procedures, I'm sure I can get us back over 75% (we're at 72% now).
My question is: How do you test a class like the one listed below?
public class jdeContractPriceManagerBase {
public class ValueObject {
private String[] apex_schema_type_info = new String[]{'http://base.bssvfoundation.e1.oracle','false','false'};
private String[] field_order_type_info = new String[]{};
}
public class MessageValueObject {
public jdeContractPriceManagerUtil.E1MessageList e1MessageList;
private String[] e1MessageList_type_info = new String[]{'e1MessageList','http://util.bssvfoundation.e1.oracle','E1MessageList','1','1','true'};
private String[] apex_schema_type_info = new String[]{'http://base.bssvfoundation.e1.oracle','false','false'};
private String[] field_order_type_info = new String[]{'e1MessageList'};
}
}
Thanks for any help you can provide.
This should serve as a dummy test class for the code you provided. Please note that this is not really a best practice but only a workaround:
If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.
Thanks,
Shashank
All Answers
This should serve as a dummy test class for the code you provided. Please note that this is not really a best practice but only a workaround:
If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.
Thanks,
Shashank