Why
Our code is verbose because it needs to ensure both typesafe APIs and runtime resolution of values and handling of incomplete inputs
Now that inputs, models, decisions, values, primitives are consolidated we can finally abstract repetition so that
- less tests to maintain (test once, mock elsewhere)
- smaller payload
What
Create abstraction for sets
- explicit set
- range set
- bounded set
Cover abstraction with eaxhaustive tests
Simplify tests for models using it: assert it is called and produced value returned
Why
Our code is verbose because it needs to ensure both typesafe APIs and runtime resolution of values and handling of incomplete inputs
Now that
inputs, models, decisions, values, primitivesare consolidated we can finally abstract repetition so thatWhat
Create abstraction for sets
Cover abstraction with eaxhaustive tests
Simplify tests for models using it: assert it is called and produced value returned