visual studio 2010 - Is It Possible to do Context/Specification Testing With MSTest? -
i'm moderately new test frameworks , have been reading on moq , this introductory post used way of organising tests had not seen before. further research shows in .net world tend meld terms bdd , context/specification (cs) testing. don't want argument - interested in achieving style of writing test classes.
this article shows approach again , makes explicit use of base class allows construct our specification through test framework.
this issue have cannot see instance method under mstest allow test fixture initialised once each test. best can see constructor of test class feels bit wrong. in nunit 1 use [testfixturesetup]
. there equivalent using visual studio's built in test framework?
edit i've subsequently moved nunit provides flexibility require.
after investigation have moved using nunit. there several reasons preferring nunit on mstest but, regards particular issue, compelling reason class-wide initialisation method supported mstest (that doesn't run every test) static methods not i'm looking for.
as jason points out [classinitialise]
provide static, class wide initialisation in mstest. there isn't way of mimicking behavior of [textfixturesetup]
found in nunit such instance method run once before test in fixture run.
Comments
Post a Comment