Skip to content

add Vehicle faker with comprehensive vehicle data generation - #35

Merged
TheJavaGuy merged 2 commits into
masterfrom
vehicle-faker
Feb 28, 2026
Merged

TheJavaGuy merged 2 commits into
masterfrom
vehicle-faker

Conversation

@TheJavaGuy

Copy link
Copy Markdown
Owner

Summary

  • Implements Vehicle faker class with 15 methods: make, model, makeAndModel, color, fuelType, transmission, driveType, vehicleType, doors, carOption, standardSpec, vin, licensePlate, year, mileage, engine
  • Extends vehicle.yml with models (flat list), vehicle_types, and license_plate_patterns; fixes doors values to be quoted strings (integers caused ClassCastException in fetchString())
  • Registers Vehicle in Faker.java (field, constructor init, getter)
  • Adds LEARNINGS.md entries for YAML integer quoting and bothify(pattern, true) for uppercase output
  • Fixes yaml-check in justfile to prefer yq over python3 (PyYAML was not installed, breaking the pre-commit hook)

Test plan

  • ./mvnw test -Dtest=VehicleTest — all 18 tests pass
  • ./mvnw test — full suite (85,215 tests) passes with no regressions
  • Pre-commit hooks pass: format-check, compile, yaml-validate

Implements Vehicle faker per spec: make, model, makeAndModel, color,
fuelType, transmission, driveType, vehicleType, doors, carOption,
standardSpec, vin, licensePlate, year, mileage, engine.

Adds models, vehicle_types, and license_plate_patterns to vehicle.yml.
Updates LEARNINGS.md with two new lessons (YAML integer quoting,
bothify uppercase flag). Fixes yaml-check to prefer yq over python3.
@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 22526141304

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.09%) to 95.612%

Files with Coverage Reduction New Missed Lines %
org/thejavaguy/javafaker/CreditCard.java 1 69.84%
org/thejavaguy/javafaker/Shipping.java 2 77.53%
Totals Coverage Status
Change from base Build 22158268595: 0.09%
Covered Lines: 1950
Relevant Lines: 2010

💛 - Coveralls

@TheJavaGuy
TheJavaGuy merged commit 48c049c into master Feb 28, 2026
2 checks passed
@TheJavaGuy
TheJavaGuy deleted the vehicle-faker branch February 28, 2026 18:13
@TheJavaGuy TheJavaGuy mentioned this pull request Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants