You need to sign in to do that
Don't have an account?
can anyone tell me test class structure for below class
can somebody help me writing Test class for below class:
public with sharing class classone {
public static double getmethod1l( String param 1,
String param2, decimal param3){
double method1Qty = 0;
If ( param1.contains('32x2x33') && (param1.contains('pentium1') ||
param1.contains('Core_')) && !param1.contains('AQ') &&
!param1.contains('12W') && !param2.contains('LED')){
method1Qty = param3;
}
return method1Qty;
} // end of getmethod1
Hi,
Below code will help you:-
Hi developer sri,
In addition to what digamberlucky replied, here are a couple of links that will help you for future test classes:
- http://wiki.developerforce.com/page/An_Introduction_to_Apex_Code_Test_Methods
- http://wiki.developerforce.com/page/How_to_Write_Good_Unit_Tests
- http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_error_handling.htm for VF page and controllers
Most important being the use of asserts, bulk testing for triggers as well as Test.StartTest()/Test.StopTest().