{"id":19198364,"url":"https://github.com/simonskodt/assignment-05","last_synced_at":"2025-02-23T05:13:50.782Z","repository":{"id":46362081,"uuid":"417468978","full_name":"simonskodt/assignment-05","owner":"simonskodt","description":"Assignment 5 in BDSA","archived":false,"fork":false,"pushed_at":"2021-10-22T13:17:42.000Z","size":1449,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-04T11:12:16.102Z","etag":null,"topics":["3sem","bdsa","csharp","refactoring","tdd"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonskodt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-15T11:05:56.000Z","updated_at":"2022-10-05T11:56:20.000Z","dependencies_parsed_at":"2022-09-22T23:41:25.870Z","dependency_job_id":null,"html_url":"https://github.com/simonskodt/assignment-05","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonskodt%2Fassignment-05","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonskodt%2Fassignment-05/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonskodt%2Fassignment-05/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonskodt%2Fassignment-05/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonskodt","download_url":"https://codeload.github.com/simonskodt/assignment-05/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240271540,"owners_count":19774859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3sem","bdsa","csharp","refactoring","tdd"],"created_at":"2024-11-09T12:21:33.951Z","updated_at":"2025-02-23T05:13:50.763Z","avatar_url":"https://github.com/simonskodt.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Assignment #5\n\n**_Task to be completed by us_**  \n- [x] Build up a test suite.  \n- [x] Complete refactoring.   \n- [ ] Create other solutions (mabye better).  \n\n## C#: Gilded Rose Refactoring Kata\n\nHi and welcome to team Gilded Rose. As you know, we are a small inn with a\nprime location in a prominent city ran by a friendly innkeeper named\nAllison. We also buy and sell only the finest goods. Unfortunately, our\ngoods are constantly degrading in quality as they approach their sell by\ndate. We have a system in place that updates our inventory for us. It was\ndeveloped by a no-nonsense type named Leeroy, who has moved on to new\nadventures. Your task is to add the new feature to our system so that we\ncan begin selling a new category of items. First an introduction to our\nsystem:\n\n- All items have a SellIn value which denotes the number of days we have\nto sell the item\n- All items have a Quality value which denotes how valuable the item is\n- At the end of each day our system lowers both values for every item\n\nPretty simple, right? Well this is where it gets interesting:\n\n- Once the sell by date has passed, Quality degrades twice as fast\n- The Quality of an item is never negative\n- \"Aged Brie\" actually increases in Quality the older it gets\n- The Quality of an item is never more than 50\n- \"Sulfuras\", being a legendary item, never has to be sold or decreases\nin Quality\n- \"Backstage passes\", like aged brie, increases in Quality as it's SellIn\nvalue approaches; Quality increases by 2 when there are 10 days or less\nand by 3 when there are 5 days or less but Quality drops to 0 after the\nconcert\n\nWe have recently signed a supplier of conjured items. This requires an\nupdate to our system:\n\n- \"Conjured\" items degrade in Quality twice as fast as normal items\n\nFeel free to make any changes to the UpdateQuality method and add any\nnew code as long as everything still works correctly. However, do not\nalter the Item class or Items property as those belong to the goblin\nin the corner who will insta-rage and one-shot you as he doesn't\nbelieve in shared code ownership (you can make the UpdateQuality\nmethod and Items property static if you like, we'll cover for you).\n\nJust for clarification, an item can never have its Quality increase\nabove 50, however \"Sulfuras\" is a legendary item and as such its\nQuality is 80 and it never alters.\n\n### Exercise\n\nFork the repository and implement the \"Conjured\" use case.\n\nYou should start by writing a set of tests which prove that the original program works to specification.\n\nThen refactor the code to support \"Conjured\".\n\nYou might want to consider extracting to smaller methods and afterwards implementing small classes using polymorphism.\n\n*The rule about not altering things due to the goblin in the corner may be tweaked if you can defend it...*\n\n### Code Coverage\n\nTo calculate code coverage on this project using Coverlet you can run:\n\n```bash\ndotnet test /p:CollectCoverage=true\n```\n\n*Aim for 95-100% code coverage before you start refactoring!*\n\n### Notes\n\nWho: [@TerryHughes](https://twitter.com/TerryHughes), [@NotMyself](https://twitter.com/NotMyself)\n\nWhat \u0026 Why: [Refactor This: The Gilded Rose Kata](http://iamnotmyself.com/2011/02/13/refactor-this-the-gilded-rose-kata/)\n\nThis work is by [@TerryHughes](https://twitter.com/TerryHughes), [@NotMyself](https://twitter.com/NotMyself)\n\nThe repository can be found at [https://github.com/NotMyself/GildedRose](https://github.com/NotMyself/GildedRose)\n\n## Bonus Exercise\n\nRewrite your repository implementations from Assignment 4 to use `async` and `await`.\n\n\n## SE\n\n### Exercise 1\nResearch the following concept and provide a definition for each of them: inheritance, polymorphism, encapsulation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonskodt%2Fassignment-05","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonskodt%2Fassignment-05","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonskodt%2Fassignment-05/lists"}