asiftasleem / nbuilder

Automatically exported from code.google.com/p/nbuilder
0 stars 0 forks source link

Patch #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, 

I attached a small patch for some issues I had with creating value objects
where I wanted to test whether the constructor could throw an
ArgumentException. This resulted in a TargetInvocationException being
thrown instead of the exception thrown in the constructor.

Second, I added a new method for using single constructor arguments that I
wanted to set to a null reference. Using the method taking the 'params
Object[]' resulted in an exception being thrown when not casting to a
intented type (added a test for that as well).

Hope you like it.

Original issue reported on code.google.com by jan.van....@gmail.com on 26 Jun 2009 at 10:38

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Jan

I had a look, seems perfect. Just one small issue though, there's no test for
throwing the inner exception. This bit of code isn't covered by the tests:

catch(TargetInvocationException e)
{
    throw e.InnerException;        
}

Do you have a test already for that you could provide? If not I can write one.

Gareth

Original comment by garethdo...@googlemail.com on 15 Jul 2009 at 9:47

GoogleCodeExporter commented 8 years ago
Not yet. If you'd like I provide one, but it can take a couple of days before I 
can
get to that.

Original comment by jan.van....@gmail.com on 16 Jul 2009 at 5:17

GoogleCodeExporter commented 8 years ago
I created a new patch. The ReflectionUtil class has 100% code coverage again.

Original comment by jan.van....@gmail.com on 16 Jul 2009 at 6:52

Attachments:

GoogleCodeExporter commented 8 years ago
Integrated. Release coming soon.

Original comment by garethdo...@googlemail.com on 29 Sep 2009 at 2:02

GoogleCodeExporter commented 8 years ago

Original comment by garethdo...@googlemail.com on 21 Oct 2009 at 8:28