paulroho / SupermarketKata

A coding kata for implementing a new component in the context of an already existing software.
MIT License
3 stars 3 forks source link

Avoid getting the Product in the SpecsDriver #13

Closed paulroho closed 7 years ago

paulroho commented 7 years ago

To avoid confusion of the participants, avoid to query the product instance within the SpecsDriver class.

Eg. (C#): instead of

var product = _repository.GetProductByName(productName);
var ean = product.Number;

do

var ean = GetEanByProductName(productName);