Increase test coverage of classes CMCSubcontractorSharingResetManager, CMCAccountResetSharingManager and CMCCMUserSharingManager

Key Information

Register
Submit
The challenge is finished.

Challenge Overview

We need to increase the test coverage of the CMC Engine, built in Salesforce.com. Over the coming weeks we will be launching a series of challenges to improve the test coverage of the org.

A test class is required with 100% of test coverage. Although 98% and above code coverage of each test class is acceptable. To maintain org health we require all the apex classes should be covered with the test classes. This facilitate the deployment and the changes made on the production org.

Technial Details for this Challenge

The coverage should be atleast 98% or above for each given class. A less than 98% coverage is acceptable only if some code cannot be covered in test class in any way. Any user who first meets the given criteria will be declared as winner.  

Apex Classes to be covered are 'CMC_SubcontractorSharingResetManager', 'CMC_AccountResetSharingManager' and 'CMC_CMUserSharingManager'. There are existing test classes 'CMC_TestAccountResetSharingManager' and 'CMC_Test_CMUserSharingManager'.  For the first class(CMC_SubcontractorSharingResetManager), there is a test class(CMC_Test_SubSharingResetManager) which covers some of its code. Either create a new test class or add test methods to the existing one. For the other 2 classes, please add new methods in the existing test classes to increase coverage. Do not modify any existing methods or code in any of the classes or test classes.

Steps To Get the Current Code

Download Git-repo zip file from forum and go through Prerequisite Steps.txt and perform given steps before deploying code to your respective orgs.

Follow steps given in Prerequisite Steps to setup your development org before proceeding with deployment of code.

Add your salesforce org credentials in build.properties relacing <Username> and <Password + Security Token> and deploy the contents in your org using ant command: ant deployCMC2dev.



Final Submission Guidelines

1. Please submit a text file with notes for the changes made.
2. Do not change any source code files.
3. Include changed files only, and not the entire project.
4. Please add new methods in the test classes to increase coverage and do not modify any other methods or code in the existing classes.

ELIGIBLE EVENTS:

2017 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30055212