public void UpdateQuality() { var qualityUpdateStrategyFactory = new QualityUpdateStrategyFactory(); foreach (var item in items) { qualityUpdateStrategyFactory.Create(item).UpdateQuality(); } }
public void Create_ReturnsProperStrategyForItem(string itemName, Type expectedType) { var item = new Item { Name = itemName }; var subject = new QualityUpdateStrategyFactory(); var result = subject.Create(item); Assert.That(result, Is.TypeOf(expectedType)); }