You need to sign in to do that
Don't have an account?
sfuser12
Hi,
I am not able to cover this class. Can anybody help me?
public class fileImport {
public Blob fileBody;
public String fileName;
public String templateName;
public String careProgram;
public Date fileDate;
public String importName;
}
Thanks!
Cover Test class for import
Hi,
I am not able to cover this class. Can anybody help me?
public class fileImport {
public Blob fileBody;
public String fileName;
public String templateName;
public String careProgram;
public Date fileDate;
public String importName;
}
Thanks!
Include the constructor in class:
public class fileImport {
public Blob fileBody;
public String fileName;
public String templateName;
public String careProgram;
public Date fileDate;
public String importName;
public fileImport (){
}
}
Test Class
@isTest
private class fileImportTest {
static testmethod void testfileimport()
{
fileImport fi = new fileImport();
}
}
Thanks,
Maharajan.C
All Answers
Include the constructor in class:
public class fileImport {
public Blob fileBody;
public String fileName;
public String templateName;
public String careProgram;
public Date fileDate;
public String importName;
public fileImport (){
}
}
Test Class
@isTest
private class fileImportTest {
static testmethod void testfileimport()
{
fileImport fi = new fileImport();
}
}
Thanks,
Maharajan.C
Greetings to you!
Constructor in Apex Programming is a code and is a special method that is invoked when an object is created from the class. Constructor has the following
properties.
Method name will be same as Class.
Access specifier will be public.
This method will invoked only one that is at the time of creating an object.
This is used to instantiate the data members of the class.
So, use the below code in your Apex Controller.
public String importName;
}
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com