You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tamaya.apache.org by "Oliver B. Fischer" <o....@swe-blog.net> on 2017/02/26 10:33:09 UTC

Testing code with static methods, using powermock

Hey all,

I am just working on a bug in our extension. The bug itself is fixed but 
I also would like to write some unit tests. The code uses some static 
methods (we have a lot of them) and I would like to add PowerMock 
additionally to Mockito for mocking static methods.

Anyone objects?

Oliver

-- 
N Oliver B. Fischer
A Sch�nhauser Allee 64, 10437 Berlin, Deutschland/Germany
P +49 30 44793251
M +49 178 7903538
E o.b.fischer@swe-blog.net
S oliver.b.fischer
J oliver.b.fischer@jabber.org
X http://xing.to/obf


Re: Testing code with static methods, using powermock

Posted by Anatole Tresch <at...@gmail.com>.
+1
It is only a test dependency, so go for it!

2017-02-26 11:59 GMT+01:00 P. Ottlinger <po...@apache.org>:

> Am 26.02.2017 um 11:33 schrieb Oliver B. Fischer:
> > Anyone objects?
>
> I'd prefer to get rid of the static stuff,
> maybe we can file bugs for that.
>
> For 0.3 it's ok to have tests so PowerMock
> +1
>
> Phil
>



-- 
*Anatole Tresch*
PPMC Member Apache Tamaya
JCP Star Spec Lead
*Switzerland, Europe Zurich, GMT+1*
*maketechsimple.wordpress.com <http://maketechsimple.wordpress.com/> *
*Twitter:  @atsticks, @tamayaconf*

Re: Testing code with static methods, using powermock

Posted by "P. Ottlinger" <po...@apache.org>.
Am 26.02.2017 um 11:33 schrieb Oliver B. Fischer:
> Anyone objects?

I'd prefer to get rid of the static stuff,
maybe we can file bugs for that.

For 0.3 it's ok to have tests so PowerMock
+1

Phil