serenity
serenity copied to clipboard
Refactored SerenityConfig
How about making SerenityConfig immutable? It should be used to support config from external locations like configuration file or HTTP endpoint.
Make all set methods protected and make getSection method to return Option<SerenityConfig>. Config class would also be responsible for creating config from JSON.
That will make SerenityConfig incredible hard to test.. ):
No, for test purposes we would just need to inherit a FakeSerenityConfig class (and test trough this) or be-friend the testing class (might be even better).
Nice work with putting docstrings in your APIs. One day we could enable #80 ;)