Conversation
Test that SignalBindingFeature is known feature with Text component and that getFeatureIfInitialized won't throw IllegalStateException even in case when SignalBindingFeature is not used.
|
|
||
| @Test | ||
| public void missingSignalBindingFeatureDoNotThrow() { | ||
| // getFeatureIfInitialized may throw IllegalStateException if the |
There was a problem hiding this comment.
This looks like it tests the code the way it is implemented. What is unclear is why the caller should not use hasFeature or similar before calling getFeatureIfInitialized, the way the javadoc describes?
There was a problem hiding this comment.
More verbose and easy to miss it compared to the current way. There were methods earlier that could have used hasFeature instead of catching the exception, but still it's more code compared to having SignalBindingFeature known by default.
Actually now I'm thinking that we could remove the TextBindingFeature and replace it with SignalBindingFeature. The issue revealed this and now I don't see anymore why would we need TextBindingFeature at all.
|
The test mentioned in the other PR looks much more like what should be tested |
Yes but it's in the flow-components. But Button uses Text which is in flow. |
|



Test that SignalBindingFeature is known feature with Text component and that getFeatureIfInitialized won't throw IllegalStateException even in case when SignalBindingFeature is not used.