Open genthalili opened 6 years ago
Oh great. Thanks. I've not had the time to go back and do this myself.
Thanks for the pull request. I looked at the code and it has duplicates. It would be better to move the code into super class (AbstractAnnotationDispatcherBean). Could you create some unit tests?
Hi @bresche ,
Could you explain more how to avoid this duplicated code?
Pull up Member from BrowseAnnotationDispatcherBean,CombinedAnnotationDispatcherBean to AbstractAnnotationDispatcherBean and make methods generic:
protected Collection<T> getSupportedCombinedAnnotationExecutors(Annotation annotation) {
Collection<BrowseAnnotationExecutor> annotationExecutors = getCombinedAnnotationExecutors();
return (Collection<T>) getSupportedAnnotationExecutors(annotationExecutors, annotation);
}
Removed duplicated code and added tests, however tests are not working, I have a Null exception, could you assis on this ?
@bresche, any suggestion to fix this ?
I'll take a look at it.
Hi, I put some mocks in your test spec. Now you can use them in spock style and create some good test cases.
Thanks! I think you covered the basic testings, that's super! Can we consider merging this pull request ?
Unfortunately, not quite. We need more tests. The CombinedAnnotationDispatcherBean class is not well tested and contains code which is commented. I have slightly increased the test code coverage.
Has this progressed any further?
There are still 2 classes to test.
Hi,
I'm proposing a solution to support
EntityCombinedScreen
, please feel free to update at my forked repo.