benjamin84 / fest

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

Boxed (wrapped) Primitives Get ObjectAssert Instead of Underlying Primitive #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Due to the quirks of our persistence mechanism, primitive values are
returned as boxed (wrapped) objects, e.g., Boolean instead of boolean. This
means that if I do:

assertThat(myAccount.isPaidInFull())

means that I get an ObjectAssert instead of the more appropriate
BooleanAssert. This is because there's an assertThat(Object) that takes
precedence over auto-unboxing. 

So, it'd be great if there were versions of assertThat() that took the
boxed values and unboxed them.

Original issue reported on code.google.com by tedyo...@gmail.com on 20 Feb 2008 at 12:15

GoogleCodeExporter commented 9 years ago
I agree. Good idea ;)

Thanks Ted!

-Alex

Original comment by Alex.Rui...@gmail.com on 20 Feb 2008 at 1:44

GoogleCodeExporter commented 9 years ago
Assertions for primitive values can also be created from primitive wrappers.

Original comment by Alex.Rui...@gmail.com on 24 Feb 2008 at 3:33

GoogleCodeExporter commented 9 years ago
Set the module as a label, instead of being part of the title.

Original comment by Alex.Rui...@gmail.com on 1 Dec 2008 at 1:51