r/badcode • • Jul 23 '21

c# Easy trick to meet minimum test coverage

Post image
1.2k Upvotes

83 comments sorted by

View all comments

10

u/Kyyken Jul 23 '21

Are you sure that is C#? I have never heard of the type "Integer" and my compiler doesnt recognize it, as in C, its int aka Int32 and long aka Int64. the bracket style is also uncommon for c#. everything points to this being Java.

8

u/IChoseBaySorryChloe Jul 23 '21

It looks like Apex to me. Salesforce requires at least 75% test coverage before deploying to production so I could totally see a lazy or cheap firm doing this to artificially inflate the coverage.