When i generated unit tests the Visual studio added some fictive class that mocks my class and added the “Shadowing” attribute.
What does it do?
When i generated unit tests the Visual studio added some fictive class that mocks
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Did some research and found this. Apparantly, the
[Shadowing]attribute is used byMSTestwhen it creates an accessor class that allows you to call a private method on a class as if it were public.So when you’re unit testing a private method of a target class, that private method will be available to you via the accessor wrapper class for the target class.