GildedRose-Refactoring-Kata/csharp.NUnit/GildedRose/GildedRose.cs
2025-04-01 14:10:32 +02:00

23 lines
437 B
C#
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections.Generic;
namespace GildedRoseKata;
public class GildedRose
{
private readonly IList<Item> Items;
public GildedRose(IList<Item> Items)
{
this.Items = Items;
}
public void UpdateQuality()
{
foreach (var item in Items)
{
var strategy = UpdateStrategyFactory.CreateStrategy(item.Name);
strategy.UpdateQuality(item);
}
}
}