Commit Graph

563 Commits

Author SHA1 Message Date
Bjorn Misseghers
5f60697105 Add ItemBehaviorPicker
This creates the correct ItemBehavior implementation for the given item
name
2021-04-13 11:04:59 +02:00
Bjorn Misseghers
7435c53775 Add base class for item behavior
The class takes quality and sellIn behavior implementations as
constructor parameters
2021-04-13 10:59:23 +02:00
Bjorn Misseghers
05a3cf148a Remove DefaultItemBehavior impl
We will not create a class for every flavor of behavior possible. We
will compose the behaviors by injecting quality and sellIn behavior in
the constructor
2021-04-13 10:57:49 +02:00
Bjorn Misseghers
f98d6bcaf6 Add static constructor methods for easy-of-use 2021-04-13 10:56:44 +02:00
Bjorn Misseghers
620d48221b Add immutable sellIn behavior
SellIn does not change. Ever.
2021-04-13 10:55:38 +02:00
Bjorn Misseghers
fe94e8b8f7 Add immutable quality behavior
Quality does not change. Ever
2021-04-13 10:55:05 +02:00
Bjorn Misseghers
a7ff7f32cd Add staged quality increase behavior
Depending on the sellIn value, we can have a different rate of quality
increase. There always needs to be a default quality increase defined.
And then we need to define the stages at with the quality increase
changes.
2021-04-13 10:06:21 +02:00
Bjorn Misseghers
e68fab24b4 Add test for increasing negative quality edge case
Quality can never be lower than 0. So increasing a negative quality
should always result in a quality bigger than 0
2021-04-13 10:04:38 +02:00
Bjorn Misseghers
7e3e5d0d7c Implement faster quality decrease after sellIn
Quality decreases by 2 after the sellIn reaches 0
2021-04-13 10:03:27 +02:00
Bjorn Misseghers
e9f47d84b4 Add increasing quality behavior and test 2021-04-13 08:56:01 +02:00
Bjorn Misseghers
45ef8fc2ad Add test for DefaultQualityBehavior 2021-04-13 08:55:09 +02:00
Bjorn Misseghers
84f07913b6 Add test for DefaultSellInBehavior 2021-04-13 08:54:53 +02:00
Bjorn Misseghers
a282a8455e Add Itembehavior interface and default impl.
Again, separating the item behavior into a separate interface allows us
to determine the item behavior by choosing a sellIn and a
qualityBehavior implementation. The defaultItemBehavior uses the default
quality and sellIn behavior
2021-04-13 08:51:46 +02:00
Bjorn Misseghers
11c697d7c5 Separate qyality behavior in separate class
Same reason as for the sellIn behavior. We want to be able to provide
separate implementations and test them separately
2021-04-13 08:50:16 +02:00
Bjorn Misseghers
5f51644a8c Separate sellIn behavior in separate class
We extract this behavior in a separate interface so we can implement
different implementations of it and test them separately.
Default behavior is to decrease the sellIn date every iteration by 1
2021-04-13 08:47:35 +02:00
Bjorn Misseghers
8f6359ad93 Add tests for edge cases 2021-04-06 21:35:30 +02:00
Bjorn Misseghers
d128595952 Simplify equasion 2021-04-06 20:24:59 +02:00
Bjorn Misseghers
f040a5d3fb Extract sellIn decrease into private method 2021-04-06 20:22:31 +02:00
Bjorn Misseghers
2fb5d2bc77 Extract quality inc and decrease into private method 2021-04-06 20:21:13 +02:00
Bjorn Misseghers
8b94d335e8 Dont get item from array every time 2021-04-06 20:14:21 +02:00
Bjorn Misseghers
f1a9242aac Extract magic strings and numbers 2021-04-06 20:10:48 +02:00
Bjorn Misseghers
8a23641287 Add unit tests matching the textTests 2021-04-06 17:28:23 +02:00
Bjorn Misseghers
fced540907 Change parameter name to nrOfDays 2021-04-06 17:28:00 +02:00
Bjorn Misseghers
4a6ed7cac1 Use app tester in unit test 2021-04-06 17:13:35 +02:00
Bjorn Misseghers
bd32cf4692 Create app test util 2021-04-06 17:13:04 +02:00
Bjorn Misseghers
64bdd856ce Fix failing unit test 2021-04-06 16:55:23 +02:00
Bjorn Misseghers
7c10c52ba3 Enable java for texttest 2021-04-06 16:55:12 +02:00
Emily Bache
ca6a1d5ba7
Merge pull request #215 from AnuchitO/thai-specification
Translate Gilded Rose Requirements to Thai language
2021-03-16 14:04:35 +01:00
Emily Bache
0260e182cc
Merge pull request #216 from AnuchitO/link-to-other-languages
Add Link to other languages in README
2021-03-16 14:03:59 +01:00
Anuchit Prasertsang
e0223f2f74
Update GildedRoseRequirements_th.md
fix wording
2021-03-16 15:28:32 +07:00
Anuchit Prasertsang
9ffcafb88b
Update README : add link to languages
add link to requirement in different languages
2021-03-16 10:15:28 +07:00
Anuchit Prasertsang
7c334f8fa4
Merge pull request #1 from AnuchitO/thai-specification
Create GildedRoseRequirements_th.md
Thai language
2021-03-16 08:36:02 +07:00
Anuchit Prasertsang
e805a2fa0b
Update GildedRoseRequirements_th.md
fix typo
2021-03-15 21:41:10 +07:00
Anuchit Prasertsang
2dfcaeb347
Update GildedRoseRequirements_th.md
fix spacing
2021-03-15 21:40:21 +07:00
Anuchit Prasertsang
84a32653b9
Update GildedRoseRequirements_th.md
fix wording
2021-03-15 21:37:47 +07:00
Anuchit Prasertsang
fc58f37743
Update GildedRoseRequirements_th.md
fix typo
2021-03-15 21:36:17 +07:00
Anuchit Prasertsang
76a7937b0c
Update GildedRoseRequirements_th.md
finish translate requirement to Thai language
2021-03-15 21:35:22 +07:00
Anuchit Prasertsang
a628a25069
Update GildedRoseRequirements_th.md
finish translation
2021-03-15 21:33:31 +07:00
Anuchit Prasertsang
1b0cfd4bba
Update GildedRoseRequirements_th.md
update
2021-03-15 14:01:48 +07:00
Anuchit Prasertsang
54c57ff6ce
Update GildedRoseRequirements_th.md
continues translate a second part of requirement.
2021-03-15 13:22:11 +07:00
Anuchit Prasertsang
641ef30068
Create GildedRoseRequirements_th.md
first draft
2021-03-14 22:19:20 +07:00
Emily Bache
ffc8c5edbc
Merge pull request #214 from haraldreingruber-dedalus/fix-texttest-java-classpath
Fix texttest Java classpath for maven and gradle builds
2021-03-12 15:42:21 +01:00
haraldreingruber-dedalus
7643c4cfb2 Fix texttest Java classpath for maven and gradle builds
The suggested texttest environment config Java (classpath), doesn't work with the default maven/gradle build directories.

This change should fix the issue.

Co-Authored-By: Kristóf Juhász <76943150+kristof-juhasz@users.noreply.github.com>
Co-Authored-By: mariettas <47053959+mariettas@users.noreply.github.com>
Co-Authored-By: Marc Monserrat Núñez <32415447+munsa@users.noreply.github.com>
Co-Authored-By: Mauro Ceraso <76943029+mauroceraso@users.noreply.github.com>
Co-Authored-By: Norbert Toth <75730727+norbertgabortoth@users.noreply.github.com>
2021-03-12 13:43:16 +01:00
Emily Bache
258b23d568
Update README.md 2021-03-01 08:25:09 +01:00
Emily Bache
5d62e73898
Merge pull request #212 from albertvillanova/patch-1
Add blank lines
2021-02-22 15:49:07 +01:00
Albert Villanova del Moral
f2cf4ad415
Update test_gilded_rose.py 2021-02-18 23:01:21 +01:00
Emily Bache
33373d6fd5
Merge pull request #206 from Neppord/fix-typescript
Update typescript dependencies and the mocharc file
2021-01-28 12:27:39 +01:00
Samuel Ytterbrink
70a9e74f68 Update typescript dependencies and the mocharc file 2021-01-28 12:21:03 +01:00
Emily Bache
de2d37904a
Merge pull request #203 from rubberduck203/master
Make rust text based approval tests pass
2020-12-21 08:52:57 +01:00
Christopher J. McClellan
75c6303cee Make rust text based approval tests pass
The main method for approval tests are supposed to run 30 days.
Previous impl was using an exclusive range.
Use an inclusive range instead.
2020-12-20 14:06:26 -05:00