You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add comprehensive unit tests for Component methods
This commit adds extensive unit test coverage for previously untested
Component methods. Tests are designed to trigger methods through their
natural execution paths and public APIs rather than attempting to invoke
private methods directly.
Coverage includes:
- Shadow rendering (paintShadows with elevation, shadow calculations)
- Drag and drop operations (dragFinished, drop events, listeners)
- Pull-to-refresh functionality (triggered through paint cycle)
- Scroll and motion (scrollable components, tensile drag, listeners)
- Style processing (inline styles trigger internal string methods)
- Focus and events (focus loss, action events, state changes)
- Input handling (keyboard and pointer events, pinch gestures)
- Property binding (BindTarget implementation, property access)
- Utility methods (toString, paramString, hierarchy checks, editing)
- Component rendering and lifecycle methods
Tests follow existing patterns:
- Extend UITestBase for proper test environment
- Override protected methods (dragFinished, paramString, paintBorderBackground)
- Trigger private methods through public API calls and lifecycle
- No reflection or direct access to package-private methods
- No Mockito - uses TestCodenameOneImplementation where needed
- Java 8 syntax only
Total: 70+ test methods covering the previously untested methods.
0 commit comments