add few more tests for legendary item

This commit is contained in:
Kirti Deshmukh 2023-02-03 08:22:30 +05:30
parent 4483927360
commit e72499d0ee

View File

@ -47,18 +47,24 @@ class GildedRoseTest {
Arguments.of(new GildedRose(new Item[]{new Item("Elixir of the Mongoose", 5, 7)}), "Elixir of the Mongoose", 4, 6), Arguments.of(new GildedRose(new Item[]{new Item("Elixir of the Mongoose", 5, 7)}), "Elixir of the Mongoose", 4, 6),
//4."Sulfuras, Hand of Ragnaros"
//4.a before sellIn
Arguments.of(new GildedRose(new Item[]{new Item("Sulfuras, Hand of Ragnaros", 10, 80)}), "Sulfuras, Hand of Ragnaros", 10, 80),
//4.b after sellIn
Arguments.of(new GildedRose(new Item[]{new Item("Sulfuras, Hand of Ragnaros", 0, 80)}), "Sulfuras, Hand of Ragnaros", 0, 80), Arguments.of(new GildedRose(new Item[]{new Item("Sulfuras, Hand of Ragnaros", 0, 80)}), "Sulfuras, Hand of Ragnaros", 0, 80),
Arguments.of(new GildedRose(new Item[]{new Item("Sulfuras, Hand of Ragnaros", -1, 80)}), "Sulfuras, Hand of Ragnaros", -1, 80), Arguments.of(new GildedRose(new Item[]{new Item("Sulfuras, Hand of Ragnaros", -1, 80)}), "Sulfuras, Hand of Ragnaros", -1, 80),
//4. "Backstage passes to a TAFKAL80ETC concert" //5. "Backstage passes to a TAFKAL80ETC concert"
//4.a Before sellIn //5.a Before sellIn
Arguments.of(new GildedRose(new Item[]{new Item("Backstage passes to a TAFKAL80ETC concert", 15, 20)}), "Backstage passes to a TAFKAL80ETC concert", 14, 21), Arguments.of(new GildedRose(new Item[]{new Item("Backstage passes to a TAFKAL80ETC concert", 15, 20)}), "Backstage passes to a TAFKAL80ETC concert", 14, 21),
Arguments.of(new GildedRose(new Item[]{new Item("Backstage passes to a TAFKAL80ETC concert", 10, 49)}), "Backstage passes to a TAFKAL80ETC concert", 9, 50), Arguments.of(new GildedRose(new Item[]{new Item("Backstage passes to a TAFKAL80ETC concert", 10, 49)}), "Backstage passes to a TAFKAL80ETC concert", 9, 50),
Arguments.of(new GildedRose(new Item[]{new Item("Backstage passes to a TAFKAL80ETC concert", 10, 49)}), "Backstage passes to a TAFKAL80ETC concert", 9, 50), Arguments.of(new GildedRose(new Item[]{new Item("Backstage passes to a TAFKAL80ETC concert", 10, 49)}), "Backstage passes to a TAFKAL80ETC concert", 9, 50),
Arguments.of(new GildedRose(new Item[]{new Item("Backstage passes to a TAFKAL80ETC concert", 10, 48)}), "Backstage passes to a TAFKAL80ETC concert", 9, 50), Arguments.of(new GildedRose(new Item[]{new Item("Backstage passes to a TAFKAL80ETC concert", 10, 48)}), "Backstage passes to a TAFKAL80ETC concert", 9, 50),
Arguments.of(new GildedRose(new Item[]{new Item("Backstage passes to a TAFKAL80ETC concert", 5, 47)}), "Backstage passes to a TAFKAL80ETC concert", 4, 50), Arguments.of(new GildedRose(new Item[]{new Item("Backstage passes to a TAFKAL80ETC concert", 5, 47)}), "Backstage passes to a TAFKAL80ETC concert", 4, 50),
//4.b After sellIn //5.b After sellIn
Arguments.of(new GildedRose(new Item[]{new Item("Backstage passes to a TAFKAL80ETC concert", 0, 47)}), "Backstage passes to a TAFKAL80ETC concert", -1, 0) Arguments.of(new GildedRose(new Item[]{new Item("Backstage passes to a TAFKAL80ETC concert", 0, 47)}), "Backstage passes to a TAFKAL80ETC concert", -1, 0)
); );
} }