On Thu, 24 Apr 2008 06:21:00 -0700, Armin Galliker
<Ar***********@ discussions.mic rosoft.comwrote :
>I don't understand your question. Assert.Fail() always fails, by
definition. Every time you hit that line of code, you'll get an
exception.
Why are you surprised that that happens?
I know that. My problem isn't the fact that Assert.Fail() fails, but
rather
that the exception isn't handled...
Sigh. Can you at least see how a subject of "Assertion fails" and
comments in your original post like "my assertions...fa il in every case"
were counter-productive with respect to describing your problem?
Normally I don't have to handle the
AssertFailedExc eption by myself.
What do you mean "normally"? In what situation do you not have to handle
the exception yourself?
I think the problem is caused that the
method is called in the event handler (WorkflowComple ted).
It certainly could be. It depends on how the event handler is being
executed.
Presumably there's some aspect about the question that is specific to this
"test for a workflow", and since I'm not familiar with the use of
"workflow" in the context of .NET, I don't fully understand the question.
Frankly, at this point I would recommend that you start a whole new
thread, and put a subject that actually describes what the issue is,
including the specific area of .NET in which you're working (i.e. assuming
"workflow" has a specific meaning here, be very specific in your subject
about the fact that you're using this "workflow", and make sure you use
the precise terminology/type/etc. that .NET would use).
As things stand now, the few people who might understand the context of
"workflow" may well have just skipped past the thread, because there's
nothing immediately visible in the thread that would alert them to the
fact that it's something they might know something about.
Finally, given the apparent esoteric nature of the question, you should
probably post a concise-but-complete code sample that reliably
demonstrates the problem. The sample should demonstrate both the case
that works as you expect, as well as the case that doesn't.
Pete