Commit Graph

1046 Commits

Author SHA1 Message Date
Artur Goloyad
4074da89e3 refactor: collapse UpdateQuality to delegate to the factory
GildedRose now resolves each item to its strategy and applies it; all
rules live in the strategies. The original one-arg constructor keeps
working by delegating to ItemUpdaterFactory.Default(); a second
constructor allows injecting a custom IItemUpdaterFactory.

No behaviour change: the ThirtyDays approval snapshot and all
existing-type spec tests pass unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 20:50:46 +02:00
Artur Goloyad
8965637f18 refactor: add IItemUpdater strategies and ItemUpdaterFactory
Introduce the Strategy + Factory design: IItemUpdater (Name + Update),
an ItemUpdaterBase with the single shared [0,50] clamp helper, stateless
strategies for normal/Aged Brie/Sulfuras/Backstage, and a factory with
two-tier resolution (exact name via case-insensitive dictionary, then
Conjured prefix rule, then the default fallback).

Not wired into GildedRose yet; no behaviour change. The Conjured
strategy itself arrives in the feature commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 20:50:18 +02:00
Artur Goloyad
a0066f58cd test: add failing specification tests for Conjured items
Conjured items must degrade twice as fast: -2 before sell-by, -4 after,
never below 0. Red on purpose (TDD) - the legacy code still treats
Conjured as a normal item; they go green once ConjuredItemUpdater lands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 20:49:08 +02:00
Artur Goloyad
ecf3d7e54a test: add specification unit tests for existing item types
Green against the legacy implementation: normal items (-1/-2, floor 0),
Aged Brie (+1/+2, cap 50), Sulfuras (immutable at SellIn 0 and -1),
Backstage passes (+1 / +2 at <=10 / +3 at <=5, 0 after concert, cap 50).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 20:48:39 +02:00
Artur Goloyad
93f5e057ed test: approve characterization baseline of current behaviour
Approve the Foo approval snapshot and the pre-existing ThirtyDays
snapshot as the locked-down record of current (Conjured-still-broken)
behaviour. Replace the failing fixme placeholder with a passing
sanity check so the suite is fully green before refactoring.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 20:47:50 +02:00
Emily Bache
3e0085bfd0
Merge pull request #697 from ilandikov/chore/vitest-coverage-in-WebStorm
chore: show vitest coverage in JetBrains IDEs (TypeScript)
2026-05-05 06:50:38 +00:00
Emily Bache
fd4fcad669
Set Patreon username in FUNDING.yml
Updated Patreon username for funding support.
2026-05-05 08:31:19 +02:00
Ilyas Landikov
92d2981c64 chore: show vitest coverage in JetBrains IDEs 2026-04-30 16:32:51 +06:00
Peter Fichtner (pfichtner)
e9eb09ed9b Fix GitHub Actions condition: check repository owner instead of (non-working) repo name 2026-02-05 16:24:28 +01:00
Emily Bache
28c5e9f11d
Update CONTRIBUTING.md with new policy 2026-02-02 08:57:57 +01:00
Emily Bache
f67af32c1b
Update README.md about contributing 2026-02-02 08:53:10 +01:00
Emily Bache
9bcc8af37d
Merge pull request #679 from tashri-dev/dotnet-version-upgrade
chore: Dotnet version upgrade
2026-01-07 08:48:38 +01:00
Taha
0e6377bb04 upgrade nunit projcet to dotnet 10 LTS 2026-01-07 00:17:07 +04:00
Taha
fd4d1d60a2 upgrade xunit projcet to dotnet 10 LTS 2026-01-07 00:15:23 +04:00
Emily Bache
7e94dbd722
Merge pull request #664 from Sawalhy/docs-windows-texttest-improvements
docs: improve Windows setup instructions for TextTest with Python
2025-11-03 13:20:44 +00:00
Ahmed Sameh Elsawalhy
09005bc03a docs: improve Windows setup instructions for TextTest with Python
Fixes issue where newer versions of texttest produce .exe files instead of .py files. Updated start_texttest_from_python.bat to use texttestc.exe instead of texttestc.py. Also enhanced documentation for Windows users with recommendations for tools like Meld and fc.
2025-10-28 22:13:36 +03:00
Emily Bache
69f2361ab5
Merge pull request #659 from RalfComtesse/scala_and_texttest
Scala and texttest
2025-10-08 13:15:18 +00:00
Ralf Comtesse
95fe7d55ff approvaltests/gildedrose.approved.txt removed 2025-10-06 16:52:03 +02:00
Ralf Comtesse
96623040a5 approvaltests/gildedrose.approved.txt removed 2025-10-06 16:38:00 +02:00
Ralf Comtesse
f5242736c7 setup approval tests with golden master using scalatest 2025-10-06 16:37:03 +02:00
Ralf Comtesse
1aa971f885 approvaltests/gildedrose.approved.txt removed 2025-10-06 16:26:26 +02:00
Ralf Comtesse
1ddc66a98a setup approval tests with golden master using scalatest 2025-10-06 16:24:36 +02:00
Ralf Comtesse
24a86e2df1 cleaned up texttest_rig.py 2025-10-06 16:24:36 +02:00
Ralf Comtesse
e838a75365 suppressed sbt specific output 2025-10-06 15:51:58 +02:00
Ralf Comtesse
e8a80b8034 removed approvaltests directory 2025-10-06 15:36:24 +02:00
Ralf Comtesse
f8262a4396 setup approval tests with golden master using scalatest 2025-10-06 15:33:29 +02:00
Ralf Comtesse
24c992acb7 cleaned up texttest_rig.py 2025-10-06 15:33:26 +02:00
Ralf Comtesse
f00df0e4ae added .bloop and vscode directories for scala to .gitignore 2025-10-06 15:33:01 +02:00
Ralf Comtesse
d745f6452a * converted Java TextestFixture to scala 2025-10-06 15:33:01 +02:00
Ralf Comtesse
86a7bbaf6d updated .gitignore 2025-10-06 15:33:01 +02:00
Ralf Comtesse
f2da40423d removed old approvaltest directory 2025-10-06 12:19:41 +02:00
Ralf Comtesse
f3e62e2bbb merged with origin 2025-10-06 12:06:57 +02:00
Ralf Comtesse
0a08d92b95 removed unnecessary comment markers at line ends in TexttestFixture.scala 2025-10-06 12:06:28 +02:00
Ralf Comtesse
23dba8c86a setup approval tests with golden master using scalatest 2025-10-06 12:06:28 +02:00
Ralf Comtesse
c31a479ecb removed extra, unnecessary run in texttest_rig.py 2025-10-06 12:06:28 +02:00
Ralf Comtesse
144bb63912 cleaned up texttest_rig.py 2025-10-06 12:06:28 +02:00
Ralf Comtesse
cf00776b11 added .bloop and vscode directories for scala to .gitignore 2025-10-06 12:06:28 +02:00
Ralf Comtesse
46d0586658 * converted Java TextestFixture to scala 2025-10-06 12:06:28 +02:00
Ralf Comtesse
3655d5edc7 cleaned up texttest/config.gr 2025-10-06 10:34:40 +02:00
Ralf Comtesse
0fadc91051 removed approvaltest directory 2025-10-06 10:27:03 +02:00
Ralf Comtesse
96ced26ea0 Merge remote-tracking branch 'origin/scala_and_texttest' into scala_and_texttest
# Conflicts:
#	scala/.gitignore
#	scala/README.md
#	scala/src/test/scala/com/gildedrose/GildedRoseApprovalTest.scala
#	scala/src/test/scala/com/gildedrose/TexttestFixture.scala
2025-10-06 10:18:28 +02:00
Ralf Comtesse
c0d94a3f4b housekeeping 2025-10-06 10:13:53 +02:00
Ralf Comtesse
38c63d80f4 Updated README.txt 2025-10-06 10:03:15 +02:00
Ralf Comtesse
639c709c99 Housekeeping 2025-10-06 08:22:51 +02:00
Ralf Comtesse
5ed38a6ae3 removed example output from approval tests 2025-10-05 21:18:06 +02:00
Ralf Comtesse
2b32087843 before cleanup without java tests 2025-10-05 21:16:47 +02:00
Ralf Comtesse
2e0e557c6e * ignored old approval test
* added sbt-jupiter-interface
2025-10-04 21:19:41 +02:00
Ralf Comtesse
9456bfce1f all approval tests running with the java approval test framework 2025-10-01 08:31:06 +02:00
Ralf Comtesse
36acc45c3e dependencies added to sbt to compile GildedRoseApprovalTest.java 2025-10-01 07:32:09 +02:00
Ralf Comtesse
c27ad4786c cleaned up stdout.gr 2025-09-29 22:16:04 +02:00