junkdog / artemis-odb

A continuation of the popular Artemis ECS framework
BSD 2-Clause "Simplified" License
779 stars 113 forks source link

artemis-odb 2.0.0-RC1 - ComponentMapper and Mockito #428

Closed ThaBalla1148 closed 8 years ago

ThaBalla1148 commented 8 years ago

Hi,

After updating to artemis-odb 2.0.0-RC1, all unit test that mock ComponentMapper are now broken since you can't mock final classes.

junkdog commented 8 years ago

Oops, it wasn't meant to stick - left-over from getting rid of packed components. I'll remove it in the next RC.

you can't mock final classes,

Not being able to extend final classes is a good thing, when you're not testing. PowerMock - or something similar using runtime bytecode instrumentation - can massage classes into working with various mock/test frameworks.

ThaBalla1148 commented 8 years ago

Thanks for the response. I am aware of PowerMock, I didn't think it was ideal for everyone to have to update all unit test that uses Mockito to mock ComponentMappers.

junkdog commented 8 years ago

RC2 was just released, so closing this one. shout if i missed something.