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
kcnmaheshkcnmahesh 

Test class Help for fully commented Apex class

Hi friends..,

 

Actually i moved apex class into production.

But we are looking to change one field type in production which is associated with that apex class.

So we want to deactivate the apex class.

I commented whole class in sandbox and i am trying to move the apex class into production.

but i am not getting code coverage now . So how to write test class for an empty apex class

 

Plz help me

sfdcfoxsfdcfox

The problem is that it is no longer contributing to the overall coverage (0 lines of testable code versus 0 lines of covered code = 0% coverage). You will not be able to achieve coverage using that class alone, so you will need to increase coverage for another, completely unrelated class. This is one of the reasons why it is necessary to keep your coverage as high as possible.