mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 22:41:30 +00:00
Also updated unit tests: - Added unit tests for the new ItemBuilders classes - Refactored existing tests to use the new builders
13 lines
362 B
C#
13 lines
362 B
C#
namespace GildedRoseKata;
|
|
|
|
public abstract class AbstractItemBuilder(string name, int sellIn, int quality)
|
|
{
|
|
protected readonly string Name = name;
|
|
protected readonly int SellIn = sellIn;
|
|
protected readonly int Quality = quality;
|
|
|
|
public virtual Item Build()
|
|
{
|
|
return new() { Name = Name, SellIn = SellIn, Quality = Quality };
|
|
}
|
|
} |