function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDC KrushnaSFDC Krushna 

Test class covarage

  for (integer v = 0; v < denom.size(); v++) {  
       integer didx = v - 1;  
       integer dval = (integer)Math.pow(1000, v);  
       if (dval > val) {  
         integer mod = (integer)Math.pow(1000, didx);  
          integer l = (integer) val / mod;  
        integer r = (integer) val - (l * mod);  
         String ret = convert_nnn(l) + ' ' + denom[didx];  
         if (r > 0) {  
           ret += ', ' + english_number(r);  
         }  
          return ret;  
        }  
      }  
      return 'Should never get here, bottomed out in english_number';  
    }  
 }

Please help me for test class code covarage for the above code 
sachinarorasfsachinarorasf
Hi  Krushna,
Here you only need to call your class in the Test. And You also use assert.
Test.StartTest();
Integer ret = //call your claas.
Test.StopTest();
I hope you find the above solution helpful. If it does, please mark it as Best Answer to help others too.
Thanks and Regards,
Sachin Arora
www.sachinsf.com