Allright. So meanwhile I have to work it around somehow. Thank you for
Johan Haleby wrote:
> Actually PowerMock 1.2.5 doesn't have support for mocking instance
> methods in final system classes (getName() in the Field class is one
> example of that). This has been implemented in the trunk version though.
> However I tried to run your test against the trunk version and I got a
> NPE. I know the reason behind this and it's quite complex to fix it, but
> I'll try to do it before we release 1.3. Perhaps I have to postpone it
> to 1.4 though.
>
> /Johan
>
> On Mon, Sep 21, 2009 at 11:35 AM, Hannu Leinonen <
hlei...@gmail.com
> <mailto:
hlei...@gmail.com>> wrote:
>
>
> Well, the code uses some reflection (for validation of fields). A
> work-around would be to create a test object, and in the test use
> reflection retrieve it's Field so that it would use a real Field object
> instead of a mocked one.
>
>
> -Hannu
>
> Johan Haleby wrote:
> > Just one more thing, why do you need to mock Field at all? (it should
> > work of course but it seems to me that there may be a better way to
> > solve your actual problem).
> >
> > On Mon, Sep 21, 2009 at 10:44 AM, Johan Haleby
> <
johan....@gmail.com <mailto:
johan....@gmail.com>
> wrote:
> >
> > Yeah I saw that, sorry. Unfortunately I'm filled up with work
> atm so
> > you'll have to come back to you later.
> >
> > /Johan
> >
> >
> > On Mon, Sep 21, 2009 at 10:33 AM, Hannu Leinonen
> <
hlei...@gmail.com <mailto:
hlei...@gmail.com>