Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RainbowCakeConfiguration is not configurable in unit tests #12

Closed
dntks opened this issue Jul 24, 2020 · 2 comments
Closed

RainbowCakeConfiguration is not configurable in unit tests #12

dntks opened this issue Jul 24, 2020 · 2 comments

Comments

@dntks
Copy link

dntks commented Jul 24, 2020

Hi,

RainbowCakeConfiguration is only configurable from the Application which means the unit tests will have a default consumeExecuteExceptions = true, even if it's set to false in the application, thus I cannot test the exceptions inside the execute() methods.
Any workarounds for this?

@zsmb13
Copy link
Member

zsmb13 commented Jul 24, 2020

Ah, thanks for raising this, this seems like an oversight on my part. I guess changing configuration in unit tests simply haven't come up yet.

I'll look into providing a proper way to do this.

In the meantime, you could work around by accessing the otherwise internal RainbowCakeConfiguration object from Java code, or by creating something to call the rainbowCake method on. This doesn't have to be a real functioning Application instance, it can be a mock or just an Application you create by calling its constructor. E.g. MyApplication().rainbowCake()

@zsmb13
Copy link
Member

zsmb13 commented Oct 29, 2020

Finally addressed this in 1.2.0

@zsmb13 zsmb13 closed this as completed Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants