OpenGamma / ElSql

Manage external SQL files in Java with a little DSL goodness
Other
101 stars 26 forks source link

Change "ElsqlBundle" to non-final class #29

Closed shanejansen closed 1 year ago

shanejansen commented 6 years ago

Currently, ElsqlBundle is a final class. This becomes problematic when trying to mock an ElsqlBundle using Mockito. Mockito cannot mock final classes.

Use case: In my Spring application, ElsqlBundle is a bean that is injected into Repository classes. When testing my repository classes, I cannot mock the injected ElsqlBundle because it is a final class.

jodastephen commented 6 years ago

Thanks for the issue. I believe PowerMock can mock final classes.

shanejansen commented 6 years ago

Would you be open to making ElsqlBundle non-final? I would prefer to not bring additional dependencies into my project such as PowerMock.

jodastephen commented 1 year ago

Closing as no plans to make it non-final