Based on your screenshot, it looks like the after value is not smaller than the before value. You can use Assert.Fail() at anytime to fail a test, but it's better to use the specific asserts so that the test can tell you what is wrong. Example: Assert.GreaterThan when it fails will say something like: "Assertion Failed - Expected '6' to be greater than '6'"
On Wednesday, May 22, 2013 11:01:22 AM UTC-4, Brock Fredin wrote: > > http://tinypic.com/r/2w71n9s/5 > > On Wednesday, May 22, 2013 9:52:25 AM UTC-5, Brock Fredin wrote: >> >> Thanks for the response Adam. Really appreciate it. >> >> I'm writing an integration test. The Gist is here: >> https://gist.github.com/BrockFredin/5628138 >> >> I refactored the test to use the greaterthan assertion. I am just >> flabbergasted why the Assert.isTrue caused an exception with the gisted >> code. You can't do much complicated logic within an assertion. Also - >> Just for my notes, is there anyway to intentionally fail a test case. I >> tried some of that TestContext code seen in the gist and it didn't fail the >> test either. >> >> On Wednesday, May 22, 2013 7:03:52 AM UTC-5, Adam wrote: >>> >>> Given the assertion you've written, you might want to consider >>> Assert.IsGreaterThan(value, value2). >>> Consider posting the Test you've written. >>> >>> On Tuesday, May 21, 2013 4:18:13 PM UTC-4, Brock Fredin wrote: >>>> >>>> My Assert.isTrue(value > value2) does not work. How do I fail the test >>>> in the try/catch error trap? >>>> >>>> Thanks. >>>> >>> -- You received this message because you are subscribed to the Google Groups "MbUnit.User" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mbunituser?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
