mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-13 17:49:25 +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:
1 parent
2477b53170
commit
26870381a4
10 files changed
+19
-9
No files matched your search
+4
-1
@@ -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
-1
@@ -1,4 +1,4 @@
|
||||
namespace GildedRoseKata;
|
||||
namespace GildedRoseKata.Interfaces;
|
||||
|
||||
public interface IItemUpdater
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace GildedRoseKata;
|
||||
namespace GildedRoseKata.Interfaces;
|
||||
|
||||
public interface IItemUpdaterFactory
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace GildedRoseKata;
|
||||
namespace GildedRoseKata.Strategies;
|
||||
|
||||
public class AgedBrieUpdater : ItemUpdaterBase
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace GildedRoseKata;
|
||||
namespace GildedRoseKata.Strategies;
|
||||
|
||||
public class BackstagePassUpdater : ItemUpdaterBase
|
||||
{
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
namespace GildedRoseKata;
|
||||
using GildedRoseKata.Factories;
|
||||
|
||||
namespace GildedRoseKata.Strategies;
|
||||
|
||||
public class ConjuredItemUpdater : ItemUpdaterBase
|
||||
{
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace GildedRoseKata;
|
||||
using GildedRoseKata.Interfaces;
|
||||
|
||||
namespace GildedRoseKata.Strategies;
|
||||
|
||||
public abstract class ItemUpdaterBase : IItemUpdater
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace GildedRoseKata;
|
||||
namespace GildedRoseKata.Strategies;
|
||||
|
||||
public class NormalItemUpdater : ItemUpdaterBase
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace GildedRoseKata;
|
||||
namespace GildedRoseKata.Strategies;
|
||||
|
||||
public class SulfurasUpdater : ItemUpdaterBase
|
||||
{
|
||||
Reference in new issue
Block a user