-
Notifications
You must be signed in to change notification settings - Fork 6
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
improved FireboltProperties: removed of() factory method, added constructors #320
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you comment on what this improves? The change is fine IMO, but it's not clear what's the benefit.
Also, I'd suggest adopting a better PR/commit name. Perhaps refactor FireboltProperties to use AllArgsConstructor
or even better refactor FireboltProperties to <insert the reason for this change>
.
try (MockedConstruction<FireboltProperties> mockedFireboltPropertiesConstruction = Mockito.mockConstruction(FireboltProperties.class, (fireboltPropertiesMock, context) -> { | ||
when(fireboltPropertiesMock.getAccount()).thenReturn(fireboltProperties.getAccount()); | ||
when(fireboltPropertiesMock.getDatabase()).thenReturn(fireboltProperties.getDatabase()); | ||
//when(FireboltProperties.of(any())).thenReturn(fireboltProperties); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
Done |
241cf55
to
e34b57a
Compare
e34b57a
to
98b76d8
Compare
|
The annoying factory method
of()
is removed. Now we have constructor that acceptsProperties
instead. Constructor can guarantee that allfinal
members are initialised.