12. 2nd Step:
Solution Explorer >> select – Unit Test >> click right button >> Add >> Reference
Browse your test project file then >> bin >> Debug >> select 2 item then click “Add” button >> OK
13. 3rd Step:
In UnitTest project declar “unsing” + your project namespace then create your program class object in Unit test class and
declar your method in “Test method” then
Test >> Run >> All Tests.
14. Program-4
Step-1
Step-2
Cyclomatic complexity(C.C):
i) Number of Regions = 2.
ii) Pridicate Node + 1 = 1+1 = 2.
iii) Edge – Node + 2 = 4-4+2 = 2.
Step-3
Independent path:
Path-1: 1-2-4
Path-2: 1-2-3-2-4
Step-4
Test case:
Path Input Expected Result
1 No input available
2 5 120