c# - Why is my NUnit test failing? -



c# - Why is my NUnit test failing? -

i added nunit test (nunit newby here):

[test] public void testhhsdeliveryinterface() { var delivery = ioc.container.resolve<ihhsdelivery>(); var = delivery.getcount(); assert.greater(i, 16); }

...based on existing 1 works:

[test] public void testhhsinterface() { var hhsclient = ioc.container.resolve<ihhsclient>(); var s = hhsclient.gettestmessage("dom", "paz"); assert.greater(s.value.length, 0); }

...for context, class starts way:

[testfixture, category(sscscommon.unittests.categories.integrationtest)] public class hhsclientintegrationtests {

the method (delivery.getcount();) returning "canned" value (17) now. works. why test failing? unfortunately, test code not breakpointable - @ least, have breakpoint in it, , doesn't ever reached, should if it's failing, think, normally. nunit looks after run app , tests:

with problematic test commented out, others run fine.

update

it turns out solving this problem solved one.

using psychic debug skills:

so why test failing? unfortunately, test code not breakpointable - @ least, have breakpoint in it, , doesn't ever reached, should if it's failing, think, normally.

you not running unit test on dll think debugging. guess debug breakpoint tells code running differs form source code. clean deployment directories/ , project (all dlls) , recompile.

c# unit-testing visual-studio-2013 nunit integration-testing

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -