The Adapter Nobody Needs
PriceEngine.total(order) returns an int number of cents. A new finance export needs Decimal dollars, rounded to two places exactly once.
Facts on the table: PriceEngine is in your repo, owned by your team. It has two callers, both in the same repo. Line coverage on it is 94 percent. It is not published to any package registry and no other service imports it. A colleague proposes writing DecimalPriceAdapter so PriceEngine is not touched.
What is the right call?
Sign in to answer questions and track your progress
Sign In