GildedRose-Refactoring-Kata/csharp
2021-04-28 11:13:53 +02:00
..
Properties Added files needed to run the csharp project on VS15/17 2017-09-01 00:00:42 -03:00
.gitignore Added .gitignore file 2017-08-31 23:58:11 -03:00
App.config Added files needed to run the csharp project on VS15/17 2017-09-01 00:00:42 -03:00
ApprovalTest.cs Update 2021-04-28 00:28:22 +02:00
csharp.csproj fix approval tests to work on windows, and use Approvals framework 2019-08-28 10:30:34 +02:00
csharp.sln Update 2021-04-28 00:28:22 +02:00
GildedRose.cs interface +1 2021-04-28 11:13:53 +02:00
GildedRoseTest.cs Update 2021-04-28 00:28:22 +02:00
Item.cs remove ApprovalTest since the other languages don't have one 2018-08-10 14:43:38 +02:00
packages.config Updated NUnit to 3.9 2017-11-19 12:12:04 +01:00
Program.cs updates 2021-04-28 01:26:11 +02:00
ReadMe.md Update 2021-04-28 00:28:22 +02:00

Gilded Rose Refactoring Kata

Introduction: I will try as much as I can to write my thought processes here as it's one of the requirements. I will just write the relevant parts and not my whole thoughts. That would be weird since I was thinking of lunch just before I started. :D

SIDE COMMENTS:

  • I can't exactly do a full TDD since the application is already written. TDD requires tests before development but this is a refactoring.
  • One of the things I would ideally change if it was not explicitly said to not to is the fact that it uses strings to check. that can be really erroneous. If I had my way, I would include IDs of some sort.

1: One of the first things I want to do is just get the program to run. so am not fixing anything except what will make the program run.

  • The program seems to run fine. except I could not see the results so added a little line to see what was printed. over than that. it looks good. Makes sense why they kept using it. It works! :/

2: After this I want to include some Unit tests to ensure all parts are working as they should. This may require some fixing. Not sure.

  • First thing I did was separate the tests from the main application. I do not want to have the possibility of a memory leak or bulky apps
  • Original unit tests were written in NUnit and I chose to use MSTest. Why? no reason! Just a choice.
  • First Unit Test returned 3 errors. Test Duration Traits Error Message UpdateQualityTestForAgedBrie_SellDateIsLessThan5_IncreaseQualityByThree Failed 1 sec Assert.AreEqual failed. Expected:<3>. Actual:<1>. UpdateQualityTestForAgedBrie_SellDateIsLessThan10ButGreaterThan5_IncreaseQualityByTwo Failed 2 sec Assert.AreEqual failed. Expected:<2>. Actual:<1>. UpdateQualityTestForAgedBrie_AfterConcert_DropToZero Failed 12.7 sec Assert.AreEqual failed. Expected:<0>. Actual:<12>.

At least we now know what to work on :facepalm

3: Then when all tests are good. I can start working with an aim of not breaking any tests.