moles - value generation in pex parmeterized unit test -


i'm building unit testing using pex. problem not code branches being tested, pex keep generating parameter values fails same condition make code after condition not run.

my method goes this:

    public void setup(dbsyncscopedescription syncscopedesc, basicinfo info, string dbcontext = "mydbcontext")     {         // <pex>        contracts validation         // </pex>          string localdbconnstr = string.empty;          //this condition never parameter results in true         if (iscontextexist(dbcontext))         {             localdbconnstr = configurationmanager.connectionstrings[dbcontext + "context"].connectionstring;         }         else         {             throw new missingfieldexception("dbcontext not exist");         }          // part never being reached         provisionlocalscope(syncscopedesc, info.farmid, localdbconnstr);          info.tables = getsynctablesassynctableinfo(syncscopedesc);         adminorm.create(info.toorm(), string.format("name={0}adminentities", dbcontext));     } 

i wonder if possible tell pex pass test code reached. if not possible possible make pex take default values of function parameters 1 of tests (i think feature if not present).

thank you


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -