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
RectResolver — Rect(left, top, right, bottom) with randomized coordinates ensuring left < right, top < bottom.
RectFResolver — RectF(left, top, right, bottom) with randomized float coordinates, same ordering constraint.
PointResolver — Point(x, y) with randomized integer coordinates.
PointFResolver — PointF(x, y) with randomized float coordinates.
SizeResolver — Size(width, height) with randomized positive integer dimensions.
SizeFResolver — SizeF(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
Description
Add resolvers for
android.graphics.Rect,android.graphics.RectF,android.graphics.Point,android.graphics.PointF,android.util.Size, andandroid.util.SizeF. All are Tier 1 types with static constructors requiring no Context. Each resolver lives indev.appoutlet.some.android.resolver.Scope and constraints
RectResolver—Rect(left, top, right, bottom)with randomized coordinates ensuringleft < right,top < bottom.RectFResolver—RectF(left, top, right, bottom)with randomized float coordinates, same ordering constraint.PointResolver—Point(x, y)with randomized integer coordinates.PointFResolver—PointF(x, y)with randomized float coordinates.SizeResolver—Size(width, height)with randomized positive integer dimensions.SizeFResolver—SizeF(width, height)with randomized positive float dimensions.random: Randomonly (no strategy needed).canResolve()uses exact type matching viatypeOf<T>().canResolvebehavior, and dimensional constraints (e.g., left < right for Rect).:core.References
Scope
In scope: 6 resolver classes + 6 test classes.
Out of scope: registering resolvers in
AndroidTypeResolverProvider(ticket #14).Acceptance criteria
canResolvereturns true for its own type and false for other geometry typesRectResolvergenerates rects whereleft < rightandtop < bottomRectFResolvergenerates rects whereleft < rightandtop < bottomPointResolvergenerates points with integer coordinatesPointFResolvergenerates points with float coordinatesSizeResolvergenerates sizes with positive integer dimensionsSizeFResolvergenerates sizes with positive float dimensionsandroid.jarand run as plain JVM unit tests