mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-07-26 17:21:23 +00:00
refactor: organize updaters into Interfaces/Factories/Strategies
Pure file move + namespace alignment, no logic changes: - Interfaces/ IItemUpdater, IItemUpdaterFactory (GildedRoseKata.Interfaces) - Factories/ ItemUpdaterFactory incl. static Default() (GildedRoseKata.Factories) - Strategies/ ItemUpdaterBase + the 5 concrete updaters (GildedRoseKata.Strategies) GildedRose.cs changes only in usings; Item.cs and Program.cs untouched. Full suite 24/24 green; approval snapshot byte-identical. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
2477b53170
commit
26870381a4
@ -1,7 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GildedRoseKata;
|
||||
using GildedRoseKata.Interfaces;
|
||||
using GildedRoseKata.Strategies;
|
||||
|
||||
namespace GildedRoseKata.Factories;
|
||||
|
||||
public class ItemUpdaterFactory : IItemUpdaterFactory
|
||||
{
|
||||
@ -1,5 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using GildedRoseKata.Factories;
|
||||
using GildedRoseKata.Interfaces;
|
||||
|
||||
namespace GildedRoseKata;
|
||||
|
||||
public class GildedRose
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GildedRoseKata;
|
||||
namespace GildedRoseKata.Interfaces;
|
||||
|
||||
public interface IItemUpdater
|
||||
{
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GildedRoseKata;
|
||||
namespace GildedRoseKata.Interfaces;
|
||||
|
||||
public interface IItemUpdaterFactory
|
||||
{
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GildedRoseKata;
|
||||
namespace GildedRoseKata.Strategies;
|
||||
|
||||
public class AgedBrieUpdater : ItemUpdaterBase
|
||||
{
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GildedRoseKata;
|
||||
namespace GildedRoseKata.Strategies;
|
||||
|
||||
public class BackstagePassUpdater : ItemUpdaterBase
|
||||
{
|
||||
@ -1,4 +1,6 @@
|
||||
namespace GildedRoseKata;
|
||||
using GildedRoseKata.Factories;
|
||||
|
||||
namespace GildedRoseKata.Strategies;
|
||||
|
||||
public class ConjuredItemUpdater : ItemUpdaterBase
|
||||
{
|
||||
@ -1,6 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace GildedRoseKata;
|
||||
using GildedRoseKata.Interfaces;
|
||||
|
||||
namespace GildedRoseKata.Strategies;
|
||||
|
||||
public abstract class ItemUpdaterBase : IItemUpdater
|
||||
{
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GildedRoseKata;
|
||||
namespace GildedRoseKata.Strategies;
|
||||
|
||||
public class NormalItemUpdater : ItemUpdaterBase
|
||||
{
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GildedRoseKata;
|
||||
namespace GildedRoseKata.Strategies;
|
||||
|
||||
public class SulfurasUpdater : ItemUpdaterBase
|
||||
{
|
||||
Loading…
Reference in New Issue
Block a user