If I have a class with static Facts (test methods) and the class has a static constructor, is the constructor called for each Fact or only once for all Facts in a class? I guess it depends on how the runner loads/unloads test classes?
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.
Out of experience, I know that it is only called once for the class. It is the same if you use a static class (i.e. settings class) in your non-static tests (facts). The static object constructor is only called once for the whole test class.