Hi.
I am playing with the Test Projects of the Team Developer edition of
Visual Studio. When testing some functions, all is ok. But when I try to
test a constructor written in VB.NET, the test code is created with an
instruction:
Assert.Inconclusive("A method that does not return a value cannot be
verified.")
What does it mean? Can't I test Subs? I would like to test this
constructor since it receives some parameters and there are validations
in place for them.
TIA,
Chris Leffer
sloan - 28 Mar 2008 02:22 GMT
What are you going to test on a sub?
Assert ( Nothing.IsEqual(Nothing) ) ?
You can expose properties on the object, and check those post construction.
I think you can check if it blows up or not (aka, if you send bad data in,
and it blows up).
..
But your yearning to test a sub/void method doesn't really make sense.
Since it returns (nothing), you can't compare it to anything meaningful.
I think the error message is pretty much on the mark.
> Hi.
>
[quoted text clipped - 14 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***