Dear All
Is It possible to unit test, constructor in c#, if yes how if not why Plz response .
Thanks
How to unit test constructor c#
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit ChoudharyRank #145 · 15.8K reputationPosted Jun 26, 2013, 5:52 AM EDT
If you're testing everything like method, state then you don't actually need to test the constructor as it would automatically gets verified when everything else is tested.
Jeet Das11 reputationPosted Jun 27, 2013, 3:28 AM EDT
kartik k155 reputationPosted Dec 27, 2017, 11:49 PM EST