Question: Consider this unit test for C# ' s HashSet class: [ TestClass ( ) ] public class HashSetTests { private HashSet hs = new (
Consider this unit test for C#s HashSet class:
TestClass
public class HashSetTests
private HashSet hs new ;
TestMethod
ExpectedException typeof ArgumentException
public void RemoveBecomesEmptySucceeds
hsAdd;
hsRemove;
You can consult the specification for C#s HashSet class hereLinks to an external site., but it probably works the way you think it should.
Assume there are other tests in the test class that are not show here. Which of the following are design or correctness problems exhibited by this test? Select all that apply.
Group of answer choices
It is poorly named
It expects an exception when it should not
It calls more than one HashSet method
Its state is not selfcontained
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
