c# - TestInitialize vs ClassInitialize -


what difference between testinitialize vs classinitialize in mstest? pros cons of each?

i'm under impression testinitialze should run each test, every time? correct? , classinitialize run every time new instance of class?

both attributes available classes (and hence tests) belong.

testinitialize runs before every test declared on the same class attribute declared.

classinitialize runs only on initialization of class attribute declared. in other words won't run every class. class contains classinitialize method.

if want method run once before tests or classes' initialization use assemblyinitialize.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -