listString = new List {'hello', 'how','why','something','notreally'};Public static Set setNumber = new Set {1,5,2,3,4};Public static Map maplnteger = new Map {'in'=>1, 'pk'=>2 ,'sri'=>3};public...


Question: -<br>Design the test class for the below method.<br>and Apply the proper asserts to get maximum possible coverage.<br>Here is the Method: -<br>Public static List<String> listString = new List<String>{'hello', 'how','why','something','notreally'};<br>Public static Set<Integer> setNumber = new Set<Integer>{1,5,2,3,4};<br>Public static Map<String,Integer> maplnteger = new Map<String, Integer>{'in'=>1, 'pk'=>2 ,'sri'=>3};<br>public static void myFirstMethod() {<br>//Adding a value to the List<br>listString.add('test');<br>listString.add('one');<br>System.debug('liststring'+ listString);<br>//Adding a value to the set<br>setNumber.add(5);<br>setNumber.add(6);<br>System.debug('setNumber'+ setNumber);<br>//Adding values to map<br>maplnteger.put('ban', 4);<br>maplnteger.put('Aus',5);<br>System.debug('maplnteger'+ maplnteger);<br>}<br>

Extracted text: Question: - Design the test class for the below method. and Apply the proper asserts to get maximum possible coverage. Here is the Method: - Public static List listString = new List{'hello', 'how','why','something','notreally'}; Public static Set setNumber = new Set{1,5,2,3,4}; Public static Map maplnteger = new Map{'in'=>1, 'pk'=>2 ,'sri'=>3}; public static void myFirstMethod() { //Adding a value to the List listString.add('test'); listString.add('one'); System.debug('liststring'+ listString); //Adding a value to the set setNumber.add(5); setNumber.add(6); System.debug('setNumber'+ setNumber); //Adding values to map maplnteger.put('ban', 4); maplnteger.put('Aus',5); System.debug('maplnteger'+ maplnteger); }

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here