Skip to content

Implement Android geometry resolvers (Rect, RectF, Point, PointF, Size, SizeF) #78

Description

@MessiasLima

Description

Add resolvers for android.graphics.Rect, android.graphics.RectF, android.graphics.Point, android.graphics.PointF, android.util.Size, and android.util.SizeF. All are Tier 1 types with static constructors requiring no Context. Each resolver lives in dev.appoutlet.some.android.resolver.

  • Scope and constraints

    • RectResolverRect(left, top, right, bottom) with randomized coordinates ensuring left < right, top < bottom.
    • RectFResolverRectF(left, top, right, bottom) with randomized float coordinates, same ordering constraint.
    • PointResolverPoint(x, y) with randomized integer coordinates.
    • PointFResolverPointF(x, y) with randomized float coordinates.
    • SizeResolverSize(width, height) with randomized positive integer dimensions.
    • SizeFResolverSizeF(width, height) with randomized positive float dimensions.
    • All constructors receive random: Random only (no strategy needed).
    • Each canResolve() uses exact type matching via typeOf<T>().
    • Each resolver has its own JVM unit test class verifying type output, canResolve behavior, and dimensional constraints (e.g., left < right for Rect).
    • Follows the same patterns as simple resolvers from :core.
  • References

Scope

In scope: 6 resolver classes + 6 test classes.
Out of scope: registering resolvers in AndroidTypeResolverProvider (ticket #14).

Acceptance criteria

  • Each resolver's canResolve returns true for its own type and false for other geometry types
  • RectResolver generates rects where left < right and top < bottom
  • RectFResolver generates rects where left < right and top < bottom
  • PointResolver generates points with integer coordinates
  • PointFResolver generates points with float coordinates
  • SizeResolver generates sizes with positive integer dimensions
  • SizeFResolver generates sizes with positive float dimensions
  • All tests compile against android.jar and run as plain JVM unit tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions